Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

ui-types.h

Go to the documentation of this file.
00001 /*
00002  * XetPan: a libEtPan! based Mail User Agent
00003  * Copyright (C) 2002-2003 Melvin Hadasht
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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

Generated on Wed Oct 22 15:50:44 2003 for XetPan by doxygen 1.3.2