2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2007 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 "folderview.h"
28 #include "summaryview.h"
29 #include "headerview.h"
30 #include "messageview.h"
31 #include "logwindow.h"
34 #define OFFLINE_SWITCH_HOOKLIST "offline_switch"
35 #define ACCOUNT_LIST_CHANGED_HOOKLIST "account_list_changed"
36 #define MAIN_WINDOW_CLOSE "mainwindow_close"
37 #define MAIN_WINDOW_GOT_ICONIFIED "mainwindow_iconified"
43 M_TARGET_EXIST
= 1 << 2,
44 M_SINGLE_TARGET_EXIST
= 1 << 3,
46 M_ALLOW_REEDIT
= 1 << 5,
47 M_HAVE_ACCOUNT
= 1 << 6,
49 M_UNTHREADED
= 1 << 8,
50 M_ALLOW_DELETE
= 1 << 9,
51 M_INC_ACTIVE
= 1 << 10,
53 M_HAVE_NEWS_ACCOUNT
= 1 << 12,
54 M_HIDE_READ_MSG
= 1 << 13,
55 M_DELAY_EXEC
= 1 << 14,
57 M_CAN_LEARN_SPAM
= 1 << 16,
58 M_ACTIONS_EXIST
= 1 << 17,
59 M_HAVE_QUEUED_MAILS
= 1 << 18,
60 M_WANT_SYNC
= 1 << 19,
61 M_TAGS_EXIST
= 1 << 20,
62 M_HAVE_PROCESSING
= 1 << 21
68 VERTICAL_LAYOUT
= 1 << 0,
70 WIDE_MSGLIST_LAYOUT
= 1 << 2,
80 TOOLBAR_BOTH_HORIZ
= 4
92 GtkItemFactory
*menu_factory
;
94 /* Toolbar handlebox */
100 GtkWidget
*hbox_stat
;
101 GtkWidget
*statusbar
;
102 GtkWidget
*progressbar
;
103 GtkWidget
*statuslabel
;
104 GtkWidget
*ac_button
;
107 GtkWidget
*online_switch
;
108 GtkWidget
*offline_switch
;
109 GtkWidget
*online_pixmap
;
110 GtkWidget
*offline_pixmap
;
112 /* context IDs for status bar */
115 gint summaryview_cid
;
116 gint messageview_cid
;
118 ToolbarStyle toolbar_style
;
121 guint menu_lock_count
;
124 FolderView
*folderview
;
125 SummaryView
*summaryview
;
126 MessageView
*messageview
;
128 LogWindow
*filtering_debugwin
;
130 gint progressindicator_hook
;
132 GtkWidget
*colorlabel_menu
;
133 GtkWidget
*warning_btn
;
134 GtkWidget
*tags_menu
;
142 MainWindow
*main_window_create (void);
144 void main_window_destroy (MainWindow
*mainwin
);
146 void main_window_update_actions_menu (MainWindow
*mainwin
);
148 void main_window_cursor_wait (MainWindow
*mainwin
);
149 void main_window_cursor_normal (MainWindow
*mainwin
);
151 void main_window_lock (MainWindow
*mainwin
);
152 void main_window_unlock (MainWindow
*mainwin
);
154 void main_window_reflect_prefs_all_real (gboolean pixmap_theme_changed
);
155 void main_window_reflect_prefs_all (void);
156 void main_window_reflect_prefs_all_now (void);
157 void main_window_reflect_prefs_custom_colors(MainWindow
*mainwindow
);
158 void main_window_reflect_tags_changes(MainWindow
*mainwindow
);
159 void main_window_set_summary_column (void);
160 void main_window_set_folder_column (void);
161 void main_window_set_account_menu (GList
*account_list
);
162 void main_window_set_account_menu_only_toolbar (GList
*account_list
);
164 /* Mailing list support */
165 void main_create_mailing_list_menu (MainWindow
*mainwin
, MsgInfo
*msginfo
);
166 gint
mailing_list_get_list_post_mailto (gchar
**url
, gchar
*mailto
, gint maxlen
);
168 void main_window_toggle_message_view (MainWindow
*mainwin
);
170 void main_window_get_size (MainWindow
*mainwin
);
171 void main_window_get_position (MainWindow
*mainwin
);
173 void main_window_progress_on (MainWindow
*mainwin
);
174 void main_window_progress_off (MainWindow
*mainwin
);
175 void main_window_progress_set (MainWindow
*mainwin
,
179 void main_window_empty_trash (MainWindow
*mainwin
,
181 void main_window_add_mailbox (MainWindow
*mainwin
);
183 void main_window_set_menu_sensitive (MainWindow
*mainwin
);
186 void main_window_show (MainWindow
*mainwin
);
187 void main_window_hide (MainWindow
*mainwin
);
188 void main_window_popup (MainWindow
*mainwin
);
190 SensitiveCond
main_window_get_current_state (MainWindow
*mainwin
);
192 void toolbar_set_compose_button (Toolbar
*toolbar
,
193 ComposeButtonType compose_btn_type
);
194 void main_window_destroy_all (void);
196 void main_window_toggle_work_offline (MainWindow
*mainwin
,
200 /* public so it can be disabled from summaryview */
201 gboolean
mainwindow_key_pressed (GtkWidget
*widget
,
204 MainWindow
*mainwindow_get_mainwindow (void);
205 void mainwindow_learn (MainWindow
*mainwin
,
207 void mainwindow_jump_to (const gchar
*target
,
209 void mainwindow_show_error (void);
210 void mainwindow_clear_error (MainWindow
*mainwin
);
211 gboolean
mainwindow_is_obscured (void);
212 void mainwindow_exit_folder (MainWindow
*mainwin
);
213 void mainwindow_enter_folder (MainWindow
*mainwin
);
214 void mainwindow_reset_paned (GtkPaned
*paned
);
217 gboolean
maemo_mainwindow_is_fullscreen (GtkWidget
*widget
);
218 void maemo_window_full_screen_if_needed (GtkWindow
*window
);
219 void maemo_connect_key_press_to_mainwindow (GtkWindow
*window
);
222 #endif /* __MAINWINDOW_H__ */