00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef TTYUI_H
00021 #define TTYUI_H
00022
00023 #include <ncurses.h>
00024 #include <panel.h>
00025
00026 #include "xetpan.h"
00027 #include "ui-types.h"
00028 #include "mta.h"
00029
00030 typedef struct XePTTYFoldersView_s XePTTYFoldersView;
00031
00032 struct XePTTYFoldersView_s
00033 {
00034 WINDOW *fvl_pad;
00035 WINDOW *fvl_window;
00036 PANEL *fvl_panel;
00038 WINDOW *fv_pad;
00039 WINDOW *fv_window;
00040 PANEL *fv_panel;
00041 };
00042
00043 typedef struct XePTTYSummaryView_s XePTTYSummaryView;
00044
00045 struct XePTTYSummaryView_s
00046 {
00047 };
00048
00049 typedef struct XePTTYMessageView_s XePTTYMessageView;
00050
00051 struct XePTTYMessageView_s
00052 {
00056 XePUIType type;
00057 XePUID uid;
00058 int editable;
00059 XetPan *xetpan;
00060 XePUIMain *uimain;
00061 XePFolder *folder;
00062 XePMessage *message;
00063 uint32_t muid;
00067 clist *inlined_list;
00070 char *body_text;
00071 char *default_charset;
00073
00074 };
00075
00076 typedef struct XePTTYComposeWindow_s XePTTYComposeWindow;
00077
00078 struct XePTTYComposeWindow_s
00079 {
00080 XePUIType type;
00081 XetPan *xetpan;
00082 XePUIMain *uimain;
00083 XePMTA *mta;
00084 XePTTYMessageView *messageview;
00085 char *sent_folder;
00086
00087 };
00088
00089
00090 void
00091 a_TtyUI_init(XetPan *xetpan, int *argc, char ***argv);
00092
00093 int
00094 a_TtyUI_init_check(XetPan *xetpan, int *argc, char ***argv);
00095
00096 void
00097 a_TtyUI_main(XetPan *xetpan);
00098
00099 void
00100 a_TtyUI_main_quit(XetPan *xetpan);
00101
00102 int
00103 a_TtyUI_events_pending(XetPan *xetpan);
00104
00105 void
00106 a_TtyUI_main_iteration(XetPan *xetpan);
00107
00108 void
00109 a_TtyUI_first_launch(XetPan *xetpan);
00110
00111 void
00112 a_TtyUI_compose_pending_requests(XetPan *xetpan);
00113
00114 XePUIMain *
00115 a_TtyUI_mainview_create(XetPan *xetpan, char *terminal);
00116
00117 void
00118 a_TtyUI_mainview_close(XePUIMain *uimain);
00119
00120 void
00121 a_TtyUI_foldersview_list_updated(XePUIMain *uimain);
00122
00123 void
00124 a_TtyUI_foldersview_list_refresh(XePUIMain *uimain);
00125
00126 void
00127 a_TtyUI_folder_updated(XePUIMain *uimain, XePFolder *folder);
00128
00129 void
00130 a_TtyUI_folder_refresh(XePUIMain *uimain, XePFolder *folder);
00131
00139 void
00140 a_TtyUI_message_updated(XePUIMain *uimain, XePMessage *messge);
00141
00142 void
00143 a_TtyUI_messageview_finalize(XePUIMessageView *mview, XePMessage *message);
00144
00145 void
00146 a_TtyUI_messageview_mime_view_show(XePUIMessageView *mview,
00147 XePMessage *message);
00148
00149 void
00150 a_TtyUI_messageview_mime_view_block(XePUIMessageView *mview,
00151 XePMessage *message);
00152
00153 void
00154 a_TtyUI_messageview_mime_view_unblock(XePUIMessageView *mview,
00155 XePMessage *message);
00156
00157 void
00158 a_TtyUI_messageview_mime_show_selected(XePUIMessageView *mview,
00159 XePMessage *message);
00160
00161 XePUIComposeWindow *
00162 a_TtyUI_composewindow_create(XetPan *xetpan, char *terminal);
00163
00164 void
00165 a_TtyUI_composewindow_set_message(XePUIComposeWindow *uicompose,
00166 XePMessage *message);
00167
00168 void
00169 a_TtyUI_composewindow_set_body_text(XePUIComposeWindow *uicompose,
00170 const char *text,
00171 size_t text_size,
00172 const char *text_charset);
00173 void
00174 a_TtyUI_composewindow_add_header(XePUIComposeWindow *uicompose,
00175 XePMessageHeaderType header_type,
00176 const char *header_name,
00177 const char *header_value);
00178
00179 void
00180 a_TtyUI_composewindow_close(XePUIComposeWindow *uicompose);
00181
00182 XePUIMessageView*
00183 a_TtyUI_messageview_create_standalone(XetPan *xetpan,
00184 char *terminal);
00185
00186 void
00187 a_TtyUI_messageview_close(XePUIMessageView *mview);
00188
00189 XePTTYMessageView *
00190 a_TtyUI_message_viewer(XetPan *xetpan,
00191 char *terminal,
00192 XePMessage *message,
00193 int async);
00194
00195 void
00196 a_TtyUI_about(XePUIMain *uimain);
00197
00198 void
00199 a_TtyUI_notify_error(XePUIMain *uimain);
00200
00201 void
00202 a_TtyUI_notify_error_reset(XePUIMain *uimain);
00203
00204 int
00205 a_TtyUI_create_io_watch(XePUI *ui, XePUIIOWatcher *watcher);
00206
00207 void
00208 a_TtyUI_delete_io_watch(XePUI *ui, XePUIIOWatcher *watcher);
00209
00210 #endif