2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2001 Hiroyuki Yamamoto
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #ifndef __MAINWINDOW_H__
21 #define __MAINWINDOW_H__
25 typedef struct _MainWindow MainWindow;
26 typedef struct _MainToolbar MainToolbar;
28 #include "folderview.h"
29 #include "summaryview.h"
30 #include "headerview.h"
31 #include "messageview.h"
32 #include "logwindow.h"
39 M_TARGET_EXIST = 1 << 2,
40 M_SINGLE_TARGET_EXIST = 1 << 3,
42 M_ALLOW_REEDIT = 1 << 5,
43 M_HAVE_ACCOUNT = 1 << 6,
45 M_UNTHREADED = 1 << 8,
46 M_ALLOW_DELETE = 1 << 9,
47 M_INC_ACTIVE = 1 << 10,
49 M_HAVE_NEWS_ACCOUNT = 1 << 12,
50 M_HIDE_READ_MSG = 1 << 13,
51 M_DELAY_EXEC = 1 << 14,
58 SEPARATE_FOLDER = 1 << 0,
59 SEPARATE_MESSAGE = 1 << 1,
60 SEPARATE_BOTH = (SEPARATE_FOLDER | SEPARATE_MESSAGE)
86 GtkWidget *messagewin;
91 GtkWidget *messagewin;
99 GtkItemFactory *menu_factory;
101 /* Toolbar handlebox */
102 GtkWidget *handlebox;
104 MainToolbar *toolbar;
107 GtkWidget *vbox_body;
108 GtkWidget *hbox_stat;
109 GtkWidget *statusbar;
110 GtkWidget *progressbar;
111 GtkWidget *statuslabel;
112 GtkWidget *ac_button;
115 GtkWidget *online_switch;
116 GtkWidget *offline_switch;
118 /* context IDs for status bar */
121 gint summaryview_cid;
123 ToolbarStyle toolbar_style;
126 guint menu_lock_count;
129 FolderView *folderview;
130 SummaryView *summaryview;
131 MessageView *messageview;
140 struct _MainToolbar {
145 GtkWidget *getall_btn;
147 GtkWidget *sel_down_all;
148 GtkWidget *sel_down_cur;
151 GtkWidget *compose_mail_btn;
152 GtkWidget *compose_news_btn;
154 GtkWidget *reply_btn;
155 GtkWidget *replysender_btn;
156 GtkWidget *replyall_btn;
157 GtkWidget *replylist_btn;
161 GtkWidget *delete_btn;
165 GtkWidget *separator;
167 /* for the reply buttons */
168 GtkWidget *reply_popup;
169 GtkWidget *replyall_popup;
170 GtkWidget *replylist_popup;
171 GtkWidget *replysender_popup;
173 /* the forward button similar to the reply buttons*/
174 GtkWidget *fwd_popup;
176 ComposeButtonType compose_btn_type;
178 GSList *t_action_list;
182 MainWindow *main_window_create (SeparateType type);
184 void main_window_cursor_wait (MainWindow *mainwin);
185 void main_window_cursor_normal (MainWindow *mainwin);
187 void main_window_lock (MainWindow *mainwin);
188 void main_window_unlock (MainWindow *mainwin);
190 void main_window_reflect_prefs_all_real (gboolean pixmap_theme_changed);
191 void main_window_reflect_prefs_all (void);
192 void main_window_set_summary_column (void);
193 void main_window_set_account_menu (GList *account_list);
194 void main_window_separation_change (MainWindow *mainwin,
197 void main_window_toggle_message_view (MainWindow *mainwin);
199 void main_window_get_size (MainWindow *mainwin);
200 void main_window_get_position (MainWindow *mainwin);
202 void main_window_empty_trash (MainWindow *mainwin,
204 void main_window_add_mailbox (MainWindow *mainwin);
206 void main_window_set_menu_sensitive (MainWindow *mainwin);
209 void main_window_popup (MainWindow *mainwin);
211 void main_window_toolbar_set_compose_button (MainWindow *mainwin,
212 ComposeButtonType compose_btn_type);
214 SensitiveCond main_window_get_current_state (MainWindow *mainwin);
216 void toolbar_set_sensitive (MainWindow *mainwin);
218 void toolbar_set_compose_button (MainToolbar *toolbar,
219 ComposeButtonType compose_btn_type);
220 void main_window_destroy_all (void);
221 #endif /* __MAINWINDOW_H__ */