source: owl.h @ dffb8b8

release-1.10release-1.6release-1.7release-1.8release-1.9
Last change on this file since dffb8b8 was dffb8b8, checked in by David Benjamin <davidben@mit.edu>, 14 years ago
Drop popwin and borderwin from owl_popwin Again, the WINDOWs are effectively owned by their PANELs, so we remove the extra reference to avoid possible inconsistency. Because del_panel fails to delwin, we need a little dance to delete both at once. A future abstraction layer should take care of that.
  • Property mode set to 100644
File size: 17.6 KB
RevLine 
[23e1110]1/*  Copyright (c) 2006-2009 The BarnOwl Developers. All rights reserved.
[81001c0]2 *  Copyright (c) 2004 James Kretchmar. All rights reserved.
[5ca5f8e]3 *
[81001c0]4 *  This program is free software. You can redistribute it and/or
5 *  modify under the terms of the Sleepycat License. See the COPYING
6 *  file included with the distribution for more information.
[5ca5f8e]7 */
8
[7d4fbcd]9#ifndef INC_OWL_H
10#define INC_OWL_H
11
[1bdffcb]12#ifndef OWL_PERL
13#include <curses.h>
[be1ae91]14#include <panel.h>
[1bdffcb]15#endif
[7d4fbcd]16#include <sys/param.h>
17#include <EXTERN.h>
18#include <netdb.h>
19#include <regex.h>
[d09e5a1]20#include <time.h>
[c9e72d1]21#include <signal.h>
[8232149]22#include <termios.h>
[731dd1e]23#include "libfaim/aim.h"
[dd24b6a]24#include <wchar.h>
[7d4fbcd]25#include "config.h"
[34509d5]26#include "glib.h"
[be0a79f]27#ifdef HAVE_LIBZEPHYR
[373b7e7]28#include <zephyr/zephyr.h>
[be0a79f]29#endif
[e6449bc]30#ifdef HAVE_COM_ERR_H
31#include <com_err.h>
32#endif
33
[6922edd]34/* Perl and curses don't play nice. */
35#ifdef OWL_PERL
36typedef void WINDOW;
[be1ae91]37typedef void PANEL;
[18e28a4]38/* logout is defined in FreeBSD. */
39#define logout logout_
[88dc766]40/* aim.h defines bool */
41#define HAS_BOOL
[6922edd]42#include <perl.h>
[120291c]43#include "owl_perl.h"
[18e28a4]44#undef logout
[6922edd]45#include "XSUB.h"
46#else
47typedef void SV;
[68c572a]48typedef void AV;
49typedef void HV;
[6922edd]50#endif
51
[8df704f]52#ifdef  GIT_VERSION
53#define stringify(x)       __stringify(x)
54#define __stringify(x)     #x
55#define OWL_VERSION_STRING stringify(GIT_VERSION)
56#else
[37f27bc]57#define OWL_VERSION_STRING PACKAGE_VERSION
[8df704f]58#endif
[2a2bb60]59
60/* Feature that is being tested to redirect stderr through a pipe.
61 * There may still be some portability problems with this. */
62#define OWL_STDERR_REDIR 1
[7d4fbcd]63
64#define OWL_DEBUG 0
65#define OWL_DEBUG_FILE "/var/tmp/owldebug"
66
[bd3f232]67#define OWL_CONFIG_DIR "/.owl"             /* this is relative to the user's home directory */
[38cf544c]68#define OWL_STARTUP_FILE "/.owl/startup"   /* this is relative to the user's home directory */
69
[7d4fbcd]70#define OWL_FMTEXT_ATTR_NONE      0
71#define OWL_FMTEXT_ATTR_BOLD      1
72#define OWL_FMTEXT_ATTR_REVERSE   2
73#define OWL_FMTEXT_ATTR_UNDERLINE 4
74
[9866c3a]75#define OWL_FMTEXT_UC_BASE 0x100000 /* Unicode Plane 16 - Supplementary Private Use Area-B*/
76#define OWL_FMTEXT_UC_ATTR ( OWL_FMTEXT_UC_BASE | 0x800 )
77#define OWL_FMTEXT_UC_ATTR_MASK 0x7
78#define OWL_FMTEXT_UC_COLOR_BASE ( OWL_FMTEXT_UC_BASE | 0x400 )
79#define OWL_FMTEXT_UC_FGCOLOR OWL_FMTEXT_UC_COLOR_BASE
80#define OWL_FMTEXT_UC_BGCOLOR ( OWL_FMTEXT_UC_COLOR_BASE | 0x200 )
81#define OWL_FMTEXT_UC_DEFAULT_COLOR 0x100
82#define OWL_FMTEXT_UC_FGDEFAULT ( OWL_FMTEXT_UC_FGCOLOR | OWL_FMTEXT_UC_DEFAULT_COLOR )
83#define OWL_FMTEXT_UC_BGDEFAULT ( OWL_FMTEXT_UC_BGCOLOR | OWL_FMTEXT_UC_DEFAULT_COLOR )
84#define OWL_FMTEXT_UC_COLOR_MASK 0xFF
85#define OWL_FMTEXT_UC_ALLCOLOR_MASK ( OWL_FMTEXT_UC_COLOR_MASK | OWL_FMTEXT_UC_DEFAULT_COLOR | 0x200)
86#define OWL_FMTEXT_UC_STARTBYTE_UTF8 '\xf4'
87
88#define OWL_FMTEXT_UTF8_ATTR_NONE "\xf4\x80\xa0\x80"
89#define OWL_FMTEXT_UTF8_FGDEFAULT "\xf4\x80\x94\x80"
[6f6330b]90#define OWL_FMTEXT_UTF8_BGDEFAULT "\xf4\x80\x9C\x80"
[9866c3a]91
[7d4fbcd]92#define OWL_COLOR_BLACK     0
93#define OWL_COLOR_RED       1
94#define OWL_COLOR_GREEN     2
95#define OWL_COLOR_YELLOW    3
96#define OWL_COLOR_BLUE      4
97#define OWL_COLOR_MAGENTA   5
98#define OWL_COLOR_CYAN      6
99#define OWL_COLOR_WHITE     7
[c2c5c77]100#define OWL_COLOR_DEFAULT   -1
[601733d]101#define OWL_COLOR_INVALID   -2
[7d4fbcd]102
103#define OWL_EDITWIN_STYLE_MULTILINE 0
104#define OWL_EDITWIN_STYLE_ONELINE   1
105
[f4d0975]106#define OWL_PROTOCOL_ZEPHYR         0
107#define OWL_PROTOCOL_AIM            1
108#define OWL_PROTOCOL_JABBER         2
109#define OWL_PROTOCOL_ICQ            3
110#define OWL_PROTOCOL_YAHOO          4
111#define OWL_PROTOCOL_MSN            5
112
[4b464a4]113#define OWL_MESSAGE_DIRECTION_NONE  0
114#define OWL_MESSAGE_DIRECTION_IN    1
115#define OWL_MESSAGE_DIRECTION_OUT   2
[7d4fbcd]116
[df0138f]117#define OWL_IO_READ   1
118#define OWL_IO_WRITE  2
119#define OWL_IO_EXCEPT 4
[afbf668]120
[7d4fbcd]121#define OWL_DIRECTION_NONE      0
122#define OWL_DIRECTION_DOWNWARDS 1
123#define OWL_DIRECTION_UPWARDS   2
124
[12c35df]125#define OWL_LOGGING_DIRECTION_BOTH 0
126#define OWL_LOGGING_DIRECTION_IN   1
127#define OWL_LOGGING_DIRECTION_OUT  2
128
[88736cb]129#define OWL_SCROLLMODE_NORMAL      0
130#define OWL_SCROLLMODE_TOP         1
131#define OWL_SCROLLMODE_NEARTOP     2
132#define OWL_SCROLLMODE_CENTER      3
133#define OWL_SCROLLMODE_PAGED       4
[aa2f33b3]134#define OWL_SCROLLMODE_PAGEDCENTER 5
135
[7d4fbcd]136#define OWL_TAB               3  /* This *HAS* to be the size of TABSTR below */
137#define OWL_TABSTR        "   "
138#define OWL_MSGTAB            7
139#define OWL_TYPWIN_SIZE       8
140#define OWL_HISTORYSIZE       50
141
142/* Indicate current state, as well as what is allowed */
143#define OWL_CTX_ANY          0xffff
144/* Only one of these may be active at a time... */
145#define OWL_CTX_MODE_BITS    0x000f
146#define OWL_CTX_STARTUP      0x0001
147#define OWL_CTX_READCONFIG   0x0002
148#define OWL_CTX_INTERACTIVE  0x0004
149/* Only one of these may be active at a time... */
150#define OWL_CTX_ACTIVE_BITS  0xfff0
151#define OWL_CTX_POPWIN       0x00f0
152#define OWL_CTX_POPLESS      0x0010
153#define OWL_CTX_RECWIN       0x0f00
154#define OWL_CTX_RECV         0x0100
155#define OWL_CTX_TYPWIN       0xf000
[cf83b7a]156#define OWL_CTX_EDIT         0x7000
[7d4fbcd]157#define OWL_CTX_EDITLINE     0x1000
158#define OWL_CTX_EDITMULTI    0x2000
[cf83b7a]159#define OWL_CTX_EDITRESPONSE 0x4000
[7d4fbcd]160
161#define OWL_USERCLUE_NONE       0
162#define OWL_USERCLUE_CLASSES    1
163#define OWL_USERCLUE_FOOBAR     2
164#define OWL_USERCLUE_BAZ        4
165
166#define OWL_WEBBROWSER_NONE     0
167#define OWL_WEBBROWSER_NETSCAPE 1
168#define OWL_WEBBROWSER_GALEON   2
[ae9e6be]169#define OWL_WEBBROWSER_OPERA    3
[7d4fbcd]170
171#define OWL_VARIABLE_OTHER      0
172#define OWL_VARIABLE_INT        1
173#define OWL_VARIABLE_BOOL       2
174#define OWL_VARIABLE_STRING     3
175
176#define OWL_FILTER_MAX_DEPTH    300
177
[4b464a4]178#define OWL_KEYMAP_MAXSTACK     20
[7d4fbcd]179
[4b464a4]180#define OWL_KEYBINDING_COMMAND  1   /* command string */
181#define OWL_KEYBINDING_FUNCTION 2   /* function taking no args */
[7d4fbcd]182
[4b464a4]183#define OWL_DEFAULT_ZAWAYMSG    "I'm sorry, but I am currently away from the terminal and am\nnot able to receive your message.\n"
[4b660cc]184#define OWL_DEFAULT_AAWAYMSG    "I'm sorry, but I am currently away from the terminal and am\nnot able to receive your message.\n"
[7d4fbcd]185
[1c7a4e0]186#define OWL_CMD_ALIAS_SUMMARY_PREFIX "command alias to: "
[7d4fbcd]187
[e7cc1c3]188#define OWL_WEBZEPHYR_PRINCIPAL "daemon.webzephyr"
[1d3e925]189#define OWL_WEBZEPHYR_CLASS     "webzephyr"
190#define OWL_WEBZEPHYR_OPCODE    "webzephyr"
[e7cc1c3]191
[80e54a7]192#define OWL_REGEX_QUOTECHARS    "+*.?[]^\\${}()"
[bc08664]193#define OWL_REGEX_QUOTEWITH     "\\"
194
[0435c7d]195#if defined(HAVE_DES_STRING_TO_KEY) && defined(HAVE_DES_KEY_SCHED) && defined(HAVE_DES_ECB_ENCRYPT)
[c86a35c]196#define OWL_ENABLE_ZCRYPT 1
[c269e22]197#endif
198
[62fdd29]199#define OWL_META(key) ((key)|010000)
[f87c490]200/* OWL_CTRL is definied in kepress.c */
[7d4fbcd]201
202#define LINE 2048
203
[712caac]204#ifdef HAVE_LIBZEPHYR
[6337cb5]205/* libzephyr doesn't use const, so we appease the type system with this kludge.
206 * This just casts const char * to char * in a way that doesn't yield a warning
207 * from gcc -Wcast-qual. */
[712caac]208static inline char *zstr(const char *str)
209{
[6337cb5]210  union { char *rw; const char *ro; } u;
211  u.ro = str;
212  return u.rw;
[712caac]213}
214#endif
215
[e19eb97]216/* Convert char *const * into const char *const *.  This conversion is safe,
[c529ac8]217 * and implicit in C++ (conv.qual 4) but for some reason not in C. */
[e19eb97]218static inline const char *const *strs(char *const *pstr)
[c529ac8]219{
[e19eb97]220  return (const char *const *)pstr;
[c529ac8]221}
222
[7d4fbcd]223typedef struct _owl_variable {
224  char *name;
225  int   type;  /* OWL_VARIABLE_* */
226  void *pval_default;  /* for types other and string */
227  int   ival_default;  /* for types int and bool     */
228  char *validsettings;          /* documentation of valid settings */
[aa2f33b3]229  char *summary;                /* summary of usage */
230  char *description;            /* detailed description */
[7d4fbcd]231  void *val;                    /* current value */
[64735f0]232  int  (*validate_fn)(const struct _owl_variable *v, const void *newval);
[7d4fbcd]233                                /* returns 1 if newval is valid */
[e19eb97]234  int  (*set_fn)(struct _owl_variable *v, const void *newval); 
[7d4fbcd]235                                /* sets the variable to a value
236                                 * of the appropriate type.
237                                 * unless documented, this
238                                 * should make a copy.
239                                 * returns 0 on success. */
[e19eb97]240  int  (*set_fromstring_fn)(struct _owl_variable *v, const char *newval);
[7d4fbcd]241                                /* sets the variable to a value
242                                 * of the appropriate type.
243                                 * unless documented, this
244                                 * should make a copy.
245                                 * returns 0 on success. */
[64735f0]246  const void *(*get_fn)(const struct _owl_variable *v);
[7d4fbcd]247                                /* returns a reference to the current value.
248                                 * WARNING:  this approach is hard to make
249                                 * thread-safe... */
[64735f0]250  int  (*get_tostring_fn)(const struct _owl_variable *v, 
[e19eb97]251                          char *buf, int bufsize, const void *val); 
[7d4fbcd]252                                /* converts val to a string
253                                 * and puts into buf */
254  void  (*free_fn)(struct _owl_variable *v);
255                                /* frees val as needed */
256} owl_variable;
257
[428834d]258typedef struct _owl_input {
259  int ch;
260  gunichar uch;
261} owl_input;
262
[7d4fbcd]263typedef struct _owl_fmtext {
264  int textlen;
[a387d12e]265  int bufflen;
[7d4fbcd]266  char *textbuff;
[9866c3a]267  char default_attrs;
268  short default_fgcolor;
269  short default_bgcolor;
[7d4fbcd]270} owl_fmtext;
271
272typedef struct _owl_list {
273  int size;
274  int avail;
275  void **list;
276} owl_list;
277
278typedef struct _owl_dict_el {
279  char *k;                      /* key   */
280  void *v;                      /* value */
281} owl_dict_el;
282
283typedef struct _owl_dict {
284  int size;
285  int avail;
286  owl_dict_el *els;             /* invariant: sorted by k */
287} owl_dict;
288typedef owl_dict owl_vardict;   /* dict of variables */
289typedef owl_dict owl_cmddict;   /* dict of commands */
290
291typedef struct _owl_context {
292  int   mode;
293  void *data;           /* determined by mode */
[a999d9e]294  char *keymap;
[7d4fbcd]295} owl_context;
296
297typedef struct _owl_cmd {       /* command */
298  char *name;
299
300  char *summary;                /* one line summary of command */
301  char *usage;                  /* usage synopsis */
302  char *description;            /* long description of command */
303
304  int validctx;                 /* bitmask of valid contexts */
305
306  /* we should probably have a type here that says which of
307   * the following is valid, and maybe make the below into a union... */
308
309  /* Only one of these may be non-NULL ... */
310
311  char *cmd_aliased_to;         /* what this command is aliased to... */
312 
313  /* These don't take any context */
[e19eb97]314  char *(*cmd_args_fn)(int argc, const char *const *argv, const char *buff); 
[7d4fbcd]315                                /* takes argv and the full command as buff.
316                                 * caller must free return value if !NULL */
317  void (*cmd_v_fn)(void);       /* takes no args */
318  void (*cmd_i_fn)(int i);      /* takes an int as an arg */
319
320  /* The following also take the active context if it's valid */
[e19eb97]321  char *(*cmd_ctxargs_fn)(void *ctx, int argc, const char *const *argv, const char *buff); 
[7d4fbcd]322                                /* takes argv and the full command as buff.
323                                 * caller must free return value if !NULL */
324  void (*cmd_ctxv_fn)(void *ctx);               /* takes no args */
325  void (*cmd_ctxi_fn)(void *ctx, int i);        /* takes an int as an arg */
[6922edd]326  SV *cmd_perl;                                /* Perl closure that takes a list of args */
[7d4fbcd]327} owl_cmd;
328
329
330typedef struct _owl_zwrite {
[24ccc01]331  char *zwriteline;
[ce7db4d]332  char *class;
333  char *inst;
334  char *realm;
335  char *opcode;
[56330ff]336  char *zsig;
[ce7db4d]337  char *message;
[7d4fbcd]338  owl_list recips;
339  int cc;
340  int noping;
341} owl_zwrite;
342
[d0d65df]343typedef struct _owl_pair {
[e19eb97]344  const char *key;
[de1c8a5]345  char *value;
[d0d65df]346} owl_pair;
347
[a387d12e]348struct _owl_fmtext_cache;
349
[7d4fbcd]350typedef struct _owl_message {
351  int id;
[4b464a4]352  int direction;
[be0a79f]353#ifdef HAVE_LIBZEPHYR
[7d4fbcd]354  ZNotice_t notice;
[be0a79f]355#endif
[a387d12e]356  struct _owl_fmtext_cache * fmtext;
[7d4fbcd]357  int delete;
[e19eb97]358  const char *hostname;
[65ad073]359  owl_list attributes;            /* this is a list of pairs */
[25dd31a]360  char *timestr;
361  time_t time;
[7d4fbcd]362} owl_message;
363
[a387d12e]364#define OWL_FMTEXT_CACHE_SIZE 1000
365/* We cache the saved fmtexts for the last bunch of messages we
366   rendered */
367typedef struct _owl_fmtext_cache {
368    owl_message * message;
369    owl_fmtext fmtext;
370} owl_fmtext_cache;
371
[bd3f232]372typedef struct _owl_style {
373  char *name;
[120291c]374  SV *perlobj;
[bd3f232]375} owl_style;
376
[7d4fbcd]377typedef struct _owl_mainwin {
378  int curtruncated;
[f2e36b5]379  int lasttruncated;
[7d4fbcd]380  int lastdisplayed;
381} owl_mainwin;
382
383typedef struct _owl_viewwin {
384  owl_fmtext fmtext;
385  int textlines;
386  int topline;
387  int rightshift;
388  int winlines, wincols;
389  WINDOW *curswin;
[afbf668]390  void (*onclose_hook) (struct _owl_viewwin *vwin, void *data);
391  void *onclose_hook_data;
[7d4fbcd]392} owl_viewwin;
393 
394typedef struct _owl_popwin {
[8ae2de9]395  PANEL *borderpanel;
396  PANEL *poppanel;
[7d4fbcd]397  int lines;
398  int cols;
399  int active;
400  int needsfirstrefresh;
401} owl_popwin;
402
403typedef struct _owl_messagelist {
404  owl_list list;
405} owl_messagelist;
406
407typedef struct _owl_regex {
408  int negate;
409  char *string;
410  regex_t re;
411} owl_regex;
412
413typedef struct _owl_filterelement {
[bd65108]414  int (*match_message)(const struct _owl_filterelement *fe, const owl_message *m);
[cb769bb]415  /* Append a string representation of the filterelement onto buf*/
[bd65108]416  void (*print_elt)(const struct _owl_filterelement *fe, GString *buf);
[cb769bb]417  /* Operands for and,or,not*/
418  struct _owl_filterelement *left, *right;
419  /* For regex filters*/
[7d4fbcd]420  owl_regex re;
[cb769bb]421  /* Used by regexes, filter references, and perl */
422  char *field;
[7d4fbcd]423} owl_filterelement;
424
425typedef struct _owl_filter {
426  char *name;
[cb769bb]427  owl_filterelement * root;
[8fa9562]428  int fgcolor;
429  int bgcolor;
[7d4fbcd]430} owl_filter;
431
432typedef struct _owl_view {
[c3ab155]433  char *name;
[7d4fbcd]434  owl_filter *filter;
435  owl_messagelist ml;
[1fdab04]436  const owl_style *style;
[c3a47c9]437  int cachedmsgid;
[7d4fbcd]438} owl_view;
439
440typedef struct _owl_history {
441  owl_list hist;
442  int cur;
443  int touched;
444  int partial;
[12c35df]445  int repeats;
[7d4fbcd]446} owl_history;
447
[a556caa]448typedef struct _owl_editwin owl_editwin;
[a88f35a]449typedef struct _owl_editwin_excursion owl_editwin_excursion;
[10b866d]450
[7d4fbcd]451typedef struct _owl_keybinding {
[e1b136bf]452  int  *keys;                   /* keypress stack */
453  int   len;                    /* length of stack */
[7d4fbcd]454  int   type;                   /* command or function? */
455  char *desc;                   /* description (or "*user*") */
456  char *command;                /* command, if of type command */
457  void (*function_fn)(void);    /* function ptr, if of type function */
458} owl_keybinding;
459
460typedef struct _owl_keymap {
461  char     *name;               /* name of keymap */
462  char     *desc;               /* description */
463  owl_list  bindings;           /* key bindings */
[afa200a]464  const struct _owl_keymap *submap;     /* submap */
[428834d]465  void (*default_fn)(owl_input j);      /* default action (takes a keypress) */
466  void (*prealways_fn)(owl_input  j);   /* always called before a keypress is received */
467  void (*postalways_fn)(owl_input  j);  /* always called after keypress is processed */
[7d4fbcd]468} owl_keymap;
469
470typedef struct _owl_keyhandler {
471  owl_dict  keymaps;            /* dictionary of keymaps */
[afa200a]472  const owl_keymap *active;             /* currently active keymap */
[7d4fbcd]473  int       in_esc;             /* escape pressed? */
474  int       kpstack[OWL_KEYMAP_MAXSTACK+1]; /* current stack of keypresses */
475  int       kpstackpos;         /* location in stack (-1 = none) */
476} owl_keyhandler;
477
[f4d0975]478typedef struct _owl_buddy {
479  int proto;
480  char *name;
481  int isidle;
482  int idlesince;
483} owl_buddy;
484
[aa5f725]485typedef struct _owl_buddylist {
486  owl_list buddies;
487} owl_buddylist;
488
[5a95b69]489typedef struct _owl_zbuddylist {
490  owl_list zusers;
491} owl_zbuddylist;
492
[6a415e9]493typedef struct _owl_timer {
[b7bb454]494  time_t time;
495  int interval;
496  void (*callback)(struct _owl_timer *, void *);
[c675b39]497  void (*destroy)(struct _owl_timer *);
[b7bb454]498  void *data;
[6a415e9]499} owl_timer;
[aa5f725]500
[ec6ff52]501typedef struct _owl_errqueue {
502  owl_list errlist;
503} owl_errqueue;
504
[8fa9562]505typedef struct _owl_colorpair_mgr {
[99c7549]506  int next;
[c2c5c77]507  short **pairs;
[8fa9562]508} owl_colorpair_mgr;
509
[124aebc]510typedef struct _owl_obarray {
511  owl_list strings;
512} owl_obarray;
513
[df0138f]514typedef struct _owl_io_dispatch {
515  int fd;                                     /* FD to watch for dispatch. */
516  int mode;
[1895c29]517  int needs_gc;
[df0138f]518  void (*callback)(const struct _owl_io_dispatch *, void *); /* C function to dispatch to. */
519  void (*destroy)(const struct _owl_io_dispatch *);  /* Destructor */
[f36cd97]520  void *data;
[df0138f]521} owl_io_dispatch;
[9c7a701]522
[4f2166b]523typedef struct _owl_ps_action {
524  int needs_gc;
525  int (*callback)(struct _owl_ps_action *, void *);
526  void (*destroy)(struct _owl_ps_action *);
527  void *data;
528} owl_ps_action;
529
[40c6657]530typedef struct _owl_popexec {
531  int refcount;
532  owl_viewwin *vwin;
533  int winactive;
[0e5afa2]534  pid_t pid;                    /* or 0 if it has terminated */
[18fdd5f9]535  const owl_io_dispatch *dispatch;
[40c6657]536} owl_popexec;
537
[7d4fbcd]538typedef struct _owl_global {
539  owl_mainwin mw;
540  owl_popwin pw;
[10b866d]541  owl_history cmdhist;          /* command history */
542  owl_history msghist;          /* outgoing message history */
[7d4fbcd]543  owl_keyhandler kh;
[129e609]544  owl_dict filters;
545  GList *filterlist;
[7d4fbcd]546  owl_list puntlist;
547  owl_vardict vars;
548  owl_cmddict cmds;
[a999d9e]549  GList *context_stack;
[ec6ff52]550  owl_errqueue errqueue;
[7d4fbcd]551  int lines, cols;
[bd783db]552  int curmsg, topmsg;
[70110286]553  int markedmsgid;              /* for finding the marked message when it has moved. */
[7d4fbcd]554  int curmsg_vert_offset;
555  owl_view current_view;
556  owl_messagelist msglist;
[8ae2de9]557  PANEL *recpan, *seppan, *msgpan, *typpan;
[7d4fbcd]558  int needrefresh;
559  int rightshift;
560  int resizepending;
561  int recwinlines;
562  int typwinactive;
[a8938c7]563  char *thishost;
564  char *homedir;
[b363d83]565  char *confdir;
566  char *startupfile;
[7d4fbcd]567  int direction;
568  int zaway;
569  char *cur_zaway_msg;
570  int haveconfig;
571  int config_format;
[1b6b2f3]572  void *buffercbdata;
[a556caa]573  owl_editwin *tw;
[7d4fbcd]574  owl_viewwin vw;
575  void *perl;
576  int debug;
[7f792c1]577  time_t starttime;
578  time_t lastinputtime;
[a8938c7]579  char *startupargs;
[7d4fbcd]580  int userclue;
581  int nextmsgid;
582  int hascolors;
583  int colorpairs;
[8fa9562]584  owl_colorpair_mgr cpmgr;
[0e5afa2]585  pid_t newmsgproc_pid;
[8262340]586  int malloced, freed;
[41c9a96]587  owl_regex search_re;
[d09e5a1]588  aim_session_t aimsess;
[c15bbfb]589  aim_conn_t bosconn;
[6a415e9]590  owl_timer aim_noop_timer;
591  owl_timer aim_ignorelogin_timer;
[bd3f232]592  int aim_loggedin;         /* true if currently logged into AIM */
[a352335c]593  int aim_doprocessing;     /* true if we should process AIM events (like pending login) */
[bd3f232]594  char *aim_screenname;     /* currently logged in AIM screen name */
[81655f8]595  char *aim_screenname_for_filters;     /* currently logged in AIM screen name */
[bd3f232]596  owl_buddylist buddylist;  /* list of logged in AIM buddies */
597  owl_list messagequeue;    /* for queueing up aim and other messages */
[f1e629d]598  owl_dict styledict;       /* global dictionary of available styles */
[cf83b7a]599  char *response;           /* response to the last question asked */
[09489b89]600  int havezephyr;
601  int haveaim;
[b7bb454]602  int ignoreaimlogin;
[c9e72d1]603  int got_err_signal;       /* 1 if we got an unexpected signal */
[5a95b69]604  siginfo_t err_signal_info;
605  owl_zbuddylist zbuddies;
606  owl_timer zephyr_buddycheck_timer;
[8232149]607  struct termios startup_tio;
[8e401cae]608  owl_obarray obarray;
[df0138f]609  owl_list io_dispatch_list;
[4f2166b]610  owl_list psa_list;
[58d1f8a]611  GList *timerlist;
[b7bb454]612  owl_timer *aim_nop_timer;
[52a0f14]613  int load_initial_subs;
[adee9cc]614  int interrupted;
[7d4fbcd]615} owl_global;
616
617/* globals */
[b2b0773]618extern owl_global g;
[7d4fbcd]619
620#include "owl_prototypes.h"
621
622/* these are missing from the zephyr includes for some reason */
[be0a79f]623#ifdef HAVE_LIBZEPHYR
[7d4fbcd]624int ZGetSubscriptions(ZSubscription_t *, int *);
625int ZGetLocations(ZLocations_t *,int *);
[be0a79f]626#endif
[7d4fbcd]627
628#endif /* INC_OWL_H */
Note: See TracBrowser for help on using the repository browser.