2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2012 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,
69 M_HAVE_RETRIEVABLE_ACCOUNT,
70 M_HAVE_ANY_RETRIEVABLE_ACCOUNT,
76 typedef guint64 SensitiveCondMask;
81 VERTICAL_LAYOUT = 1 << 0,
83 WIDE_MSGLIST_LAYOUT = 1 << 2,
93 TOOLBAR_BOTH_HORIZ = 4
105 /* Toolbar handlebox */
106 GtkWidget *handlebox;
110 GtkWidget *vbox_body;
111 GtkWidget *hbox_stat;
112 GtkWidget *statusbar;
113 GtkWidget *progressbar;
114 GtkWidget *statuslabel;
115 GtkWidget *ac_button;
118 GtkWidget *online_switch;
119 GtkWidget *offline_switch;
120 GtkWidget *online_pixmap;
121 GtkWidget *offline_pixmap;
123 /* context IDs for status bar */
126 gint summaryview_cid;
127 gint messageview_cid;
129 ToolbarStyle toolbar_style;
132 guint menu_lock_count;
135 FolderView *folderview;
136 SummaryView *summaryview;
137 MessageView *messageview;
139 LogWindow *filtering_debugwin;
141 gint progressindicator_hook;
143 GtkWidget *colorlabel_menu;
144 GtkWidget *warning_btn;
145 GtkWidget *tags_menu;
148 GtkActionGroup *action_group;
149 GtkUIManager *ui_manager;
156 MainWindow *main_window_create (void);
158 void main_window_update_actions_menu (MainWindow *mainwin);
160 void main_window_cursor_wait (MainWindow *mainwin);
161 void main_window_cursor_normal (MainWindow *mainwin);
163 void main_window_lock (MainWindow *mainwin);
164 void main_window_unlock (MainWindow *mainwin);
166 void main_window_reflect_prefs_all_real (gboolean pixmap_theme_changed);
167 void main_window_reflect_prefs_all (void);
168 void main_window_reflect_prefs_all_now (void);
169 void main_window_reflect_prefs_custom_colors(MainWindow *mainwindow);
170 void main_window_reflect_tags_changes(MainWindow *mainwindow);
171 void main_window_set_summary_column (void);
172 void main_window_set_folder_column (void);
173 void main_window_set_account_menu (GList *account_list);
174 void main_window_set_account_menu_only_toolbar (GList *account_list);
176 /* Mailing list support */
177 void main_create_mailing_list_menu (MainWindow *mainwin, MsgInfo *msginfo);
178 gint mailing_list_get_list_post_mailto (gchar **url, gchar *mailto, gint maxlen);
180 void main_window_toggle_message_view (MainWindow *mainwin);
182 void main_window_get_size (MainWindow *mainwin);
183 void main_window_get_position (MainWindow *mainwin);
185 void main_window_progress_on (MainWindow *mainwin);
186 void main_window_progress_off (MainWindow *mainwin);
187 gboolean main_window_empty_trash (MainWindow *mainwin,
191 guint64 main_window_get_mask(SensitiveCond cond, ...);
193 void main_window_set_menu_sensitive (MainWindow *mainwin);
196 void main_window_show (MainWindow *mainwin);
197 void main_window_hide (MainWindow *mainwin);
198 void main_window_popup (MainWindow *mainwin);
200 SensitiveCond main_window_get_current_state (MainWindow *mainwin);
202 void toolbar_set_compose_button (Toolbar *toolbar,
203 ComposeButtonType compose_btn_type);
204 void main_window_destroy_all (void);
206 void main_window_toggle_work_offline (MainWindow *mainwin,
210 MainWindow *mainwindow_get_mainwindow (void);
211 void mainwindow_learn (MainWindow *mainwin,
213 void mainwindow_jump_to (const gchar *target,
215 void mainwindow_show_error (void);
216 void mainwindow_clear_error (MainWindow *mainwin);
217 gboolean mainwindow_is_obscured (void);
218 void mainwindow_exit_folder (MainWindow *mainwin);
219 void mainwindow_enter_folder (MainWindow *mainwin);
220 void mainwindow_reset_paned (GtkPaned *paned);
223 gboolean maemo_mainwindow_is_fullscreen (GtkWidget *widget);
224 void maemo_window_full_screen_if_needed (GtkWindow *window);
225 void maemo_connect_key_press_to_mainwindow (GtkWindow *window);
226 void mainwindow_maemo_led_set(gboolean state);
229 void mainwin_accel_changed_cb (GtkAccelGroup *accelgroup, guint keyval, GdkModifierType modifier,
230 GClosure *closure, GtkMenuItem *item);
232 #endif /* __MAINWINDOW_H__ */