2 * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2016 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/>.
19 #ifndef __MAINWINDOW_H__
20 #define __MAINWINDOW_H__
24 typedef struct _MainWindow MainWindow
;
26 #include "viewtypes.h"
27 #include "logwindow.h"
31 #define OFFLINE_SWITCH_HOOKLIST "offline_switch"
32 #define ACCOUNT_LIST_CHANGED_HOOKLIST "account_list_changed"
33 #define MAIN_WINDOW_CLOSE "mainwindow_close"
34 #define MAIN_WINDOW_GOT_ICONIFIED "mainwindow_iconified"
35 #define THEME_CHANGED_HOOKLIST "theme_changed"
41 M_SINGLE_TARGET_EXIST
,
70 M_HAVE_RETRIEVABLE_ACCOUNT
,
71 M_HAVE_ANY_RETRIEVABLE_ACCOUNT
,
78 typedef guint64 SensitiveCondMask
;
83 VERTICAL_LAYOUT
= 1 << 0,
85 WIDE_MSGLIST_LAYOUT
= 1 << 2,
95 TOOLBAR_BOTH_HORIZ
= 4
107 /* Toolbar handlebox */
108 GtkWidget
*handlebox
;
112 GtkWidget
*vbox_body
;
113 GtkWidget
*hbox_stat
;
114 GtkWidget
*statusbar
;
115 GtkWidget
*progressbar
;
116 GtkWidget
*statuslabel
;
117 GtkWidget
*ac_button
;
120 GtkWidget
*online_switch
;
121 GtkWidget
*offline_switch
;
122 GtkWidget
*online_pixmap
;
123 GtkWidget
*offline_pixmap
;
125 /* context IDs for status bar */
128 gint summaryview_cid
;
129 gint messageview_cid
;
131 ToolbarStyle toolbar_style
;
134 guint menu_lock_count
;
137 FolderView
*folderview
;
138 SummaryView
*summaryview
;
139 MessageView
*messageview
;
141 LogWindow
*filtering_debugwin
;
143 gint progressindicator_hook
;
145 GtkWidget
*colorlabel_menu
;
146 GtkWidget
*warning_btn
;
147 GtkWidget
*tags_menu
;
150 GtkActionGroup
*action_group
;
151 GtkUIManager
*ui_manager
;
158 MainWindow
*main_window_create (void);
160 void main_window_update_actions_menu (MainWindow
*mainwin
);
162 void main_window_cursor_wait (MainWindow
*mainwin
);
163 void main_window_cursor_normal (MainWindow
*mainwin
);
165 void main_window_lock (MainWindow
*mainwin
);
166 void main_window_unlock (MainWindow
*mainwin
);
168 void main_window_reflect_prefs_all_real (gboolean pixmap_theme_changed
);
169 void main_window_reflect_prefs_all (void);
170 void main_window_reflect_prefs_all_now (void);
171 void main_window_reflect_prefs_custom_colors(MainWindow
*mainwindow
);
172 void main_window_reflect_tags_changes(MainWindow
*mainwindow
);
173 void main_window_set_summary_column (void);
174 void main_window_set_folder_column (void);
175 void main_window_set_account_menu (GList
*account_list
);
176 void main_window_set_account_menu_only_toolbar (GList
*account_list
);
178 /* Mailing list support */
179 void main_create_mailing_list_menu (MainWindow
*mainwin
, MsgInfo
*msginfo
);
180 gint
mailing_list_get_list_post_mailto (gchar
**url
, gchar
*mailto
, gint maxlen
);
182 void main_window_toggle_message_view (MainWindow
*mainwin
);
184 void main_window_get_size (MainWindow
*mainwin
);
185 void main_window_get_position (MainWindow
*mainwin
);
187 void main_window_progress_on (MainWindow
*mainwin
);
188 void main_window_progress_off (MainWindow
*mainwin
);
189 gboolean
main_window_empty_trash (MainWindow
*mainwin
,
193 SensitiveCondMask
main_window_get_mask(SensitiveCond cond
, ...);
195 void main_window_set_menu_sensitive (MainWindow
*mainwin
);
198 void main_window_show (MainWindow
*mainwin
);
199 void main_window_hide (MainWindow
*mainwin
);
200 void main_window_popup (MainWindow
*mainwin
);
202 SensitiveCondMask
main_window_get_current_state (MainWindow
*mainwin
);
204 void toolbar_set_compose_button (Toolbar
*toolbar
,
205 ComposeButtonType compose_btn_type
);
206 void main_window_destroy_all (void);
208 void main_window_toggle_work_offline (MainWindow
*mainwin
,
212 MainWindow
*mainwindow_get_mainwindow (void);
213 void mainwindow_learn (MainWindow
*mainwin
,
215 void mainwindow_jump_to (const gchar
*target
,
217 void mainwindow_show_error (void);
218 void mainwindow_clear_error (MainWindow
*mainwin
);
219 gboolean
mainwindow_is_obscured (void);
220 void mainwindow_exit_folder (MainWindow
*mainwin
);
221 void mainwindow_enter_folder (MainWindow
*mainwin
);
222 void mainwindow_reset_paned (GtkPaned
*paned
);
224 void mainwin_accel_changed_cb (GtkAccelGroup
*accelgroup
, guint keyval
, GdkModifierType modifier
,
225 GClosure
*closure
, GtkMenuItem
*item
);
227 #endif /* __MAINWINDOW_H__ */