2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2013 Hiroyuki Yamamoto and the Claws Mail team
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 3 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, see <http://www.gnu.org/licenses/>.
20 #ifndef __MAINWINDOW_H__
21 #define __MAINWINDOW_H__
25 typedef struct _MainWindow MainWindow;
27 #include "viewtypes.h"
28 #include "logwindow.h"
32 #define OFFLINE_SWITCH_HOOKLIST "offline_switch"
33 #define ACCOUNT_LIST_CHANGED_HOOKLIST "account_list_changed"
34 #define MAIN_WINDOW_CLOSE "mainwindow_close"
35 #define MAIN_WINDOW_GOT_ICONIFIED "mainwindow_iconified"
36 #define THEME_CHANGED_HOOKLIST "theme_changed"
42 M_SINGLE_TARGET_EXIST,
70 M_HAVE_RETRIEVABLE_ACCOUNT,
71 M_HAVE_ANY_RETRIEVABLE_ACCOUNT,
77 typedef guint64 SensitiveCondMask;
82 VERTICAL_LAYOUT = 1 << 0,
84 WIDE_MSGLIST_LAYOUT = 1 << 2,
94 TOOLBAR_BOTH_HORIZ = 4
106 /* Toolbar handlebox */
107 GtkWidget *handlebox;
111 GtkWidget *vbox_body;
112 GtkWidget *hbox_stat;
113 GtkWidget *statusbar;
114 GtkWidget *progressbar;
115 GtkWidget *statuslabel;
116 GtkWidget *ac_button;
119 GtkWidget *online_switch;
120 GtkWidget *offline_switch;
121 GtkWidget *online_pixmap;
122 GtkWidget *offline_pixmap;
124 /* context IDs for status bar */
127 gint summaryview_cid;
128 gint messageview_cid;
130 ToolbarStyle toolbar_style;
133 guint menu_lock_count;
136 FolderView *folderview;
137 SummaryView *summaryview;
138 MessageView *messageview;
140 LogWindow *filtering_debugwin;
142 gint progressindicator_hook;
144 GtkWidget *colorlabel_menu;
145 GtkWidget *warning_btn;
146 GtkWidget *tags_menu;
149 GtkActionGroup *action_group;
150 GtkUIManager *ui_manager;
157 MainWindow *main_window_create (void);
159 void main_window_update_actions_menu (MainWindow *mainwin);
161 void main_window_cursor_wait (MainWindow *mainwin);
162 void main_window_cursor_normal (MainWindow *mainwin);
164 void main_window_lock (MainWindow *mainwin);
165 void main_window_unlock (MainWindow *mainwin);
167 void main_window_reflect_prefs_all_real (gboolean pixmap_theme_changed);
168 void main_window_reflect_prefs_all (void);
169 void main_window_reflect_prefs_all_now (void);
170 void main_window_reflect_prefs_custom_colors(MainWindow *mainwindow);
171 void main_window_reflect_tags_changes(MainWindow *mainwindow);
172 void main_window_set_summary_column (void);
173 void main_window_set_folder_column (void);
174 void main_window_set_account_menu (GList *account_list);
175 void main_window_set_account_menu_only_toolbar (GList *account_list);
177 /* Mailing list support */
178 void main_create_mailing_list_menu (MainWindow *mainwin, MsgInfo *msginfo);
179 gint mailing_list_get_list_post_mailto (gchar **url, gchar *mailto, gint maxlen);
181 void main_window_toggle_message_view (MainWindow *mainwin);
183 void main_window_get_size (MainWindow *mainwin);
184 void main_window_get_position (MainWindow *mainwin);
186 void main_window_progress_on (MainWindow *mainwin);
187 void main_window_progress_off (MainWindow *mainwin);
188 gboolean main_window_empty_trash (MainWindow *mainwin,
192 SensitiveCondMask main_window_get_mask(SensitiveCond cond, ...);
194 void main_window_set_menu_sensitive (MainWindow *mainwin);
197 void main_window_show (MainWindow *mainwin);
198 void main_window_hide (MainWindow *mainwin);
199 void main_window_popup (MainWindow *mainwin);
201 SensitiveCondMask main_window_get_current_state (MainWindow *mainwin);
203 void toolbar_set_compose_button (Toolbar *toolbar,
204 ComposeButtonType compose_btn_type);
205 void main_window_destroy_all (void);
207 void main_window_toggle_work_offline (MainWindow *mainwin,
211 MainWindow *mainwindow_get_mainwindow (void);
212 void mainwindow_learn (MainWindow *mainwin,
214 void mainwindow_jump_to (const gchar *target,
216 void mainwindow_show_error (void);
217 void mainwindow_clear_error (MainWindow *mainwin);
218 gboolean mainwindow_is_obscured (void);
219 void mainwindow_exit_folder (MainWindow *mainwin);
220 void mainwindow_enter_folder (MainWindow *mainwin);
221 void mainwindow_reset_paned (GtkPaned *paned);
223 void mainwin_accel_changed_cb (GtkAccelGroup *accelgroup, guint keyval, GdkModifierType modifier,
224 GClosure *closure, GtkMenuItem *item);
226 #endif /* __MAINWINDOW_H__ */