00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef UI_TYPES_H
00021 #define UI_TYPES_H
00022
00023 #include <stdlib.h>
00024 #include <cinthash.h>
00025 #include <clist.h>
00026 #include <carray.h>
00027
00028 #ifdef HAVE_CONFIG_H
00029 #include "config.h"
00030 #endif
00031
00032 enum
00033 {
00034 XETPAN_EXEC_SYNC,
00035 XETPAN_EXEC_ASYNC
00036 };
00037
00038 enum
00039 {
00040 XETPAN_POLLIN = 0x01,
00041 XETPAN_POLLPRI = 0x02,
00042 XETPAN_POLLOUT = 0x04,
00043 XETPAN_POLLERR = 0x08,
00044 XETPAN_POLLHUP = 0x10,
00045 XETPAN_POLLNVAL = 0x20
00046 };
00047
00048 typedef enum
00049 {
00050 #ifdef USE_GTKUI
00051 XETPAN_UI_GTK,
00052 #endif
00053 #ifdef USE_TTYUI
00054 XETPAN_UI_TTY,
00055 #endif
00056 XETPAN_UI_NB,
00057 XETPAN_UI_UNSPECIFIED,
00058 XETPAN_UI_QUIT
00059 } XePUIType;
00060
00061 typedef unsigned long XePUID;
00062
00063 typedef cinthash_t cinthash;
00064
00065 typedef struct XePUI_s XePUI;
00066
00067 struct XePUI_s
00068 {
00069 XePUIType type;
00070 int switch_state;
00071 char *terminal;
00072 cinthash *mainviews;
00073 clist *composewindows;
00074 cinthash *messageviews;
00075 carray *watched_fd;
00076 unsigned int max_wid;
00077 int ideditor_lock;
00078 void *gtk;
00079 void *tty;
00080 };
00081
00082 typedef struct XePUIIOWatcher_s XePUIIOWatcher;
00083
00084 struct XePUIIOWatcher_s
00085 {
00086 unsigned int watch_id;
00087 int fd;
00088 void (*callback)(int afd, short int acondition, void *adata);
00089 void *data;
00090 void *channel;
00091 unsigned int tag;
00092 short int condition;
00093 };
00094
00095 typedef struct XePUIMain_s XePUIMain;
00096
00100 struct XePUIMain_s
00101 {
00102 XePUIType type;
00103 XePUID uid;
00104 void *toplevel;
00105 void *foldersview;
00106 void *summaryview;
00107 void *messageview;
00108 void *menubar;
00109 void *toolbar;
00110 void *statusbar;
00111 void *python;
00112 void *logview;
00113 void *about;
00114 void *ideditor ;
00115 void *xetpan;
00116 int kb_watch_id;
00117 void *remote;
00118 };
00119
00120 typedef union XePUIMessageView_u XePUIMessageView;
00121
00122 typedef union XePUIComposeWindow_u XePUIComposeWindow;
00123
00124 #endif