2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2004 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
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"
38 M_TARGET_EXIST = 1 << 2,
39 M_SINGLE_TARGET_EXIST = 1 << 3,
41 M_ALLOW_REEDIT = 1 << 5,
42 M_HAVE_ACCOUNT = 1 << 6,
44 M_UNTHREADED = 1 << 8,
45 M_ALLOW_DELETE = 1 << 9,
46 M_INC_ACTIVE = 1 << 10,
48 M_HAVE_NEWS_ACCOUNT = 1 << 12,
49 M_HIDE_READ_MSG = 1 << 13,
50 M_DELAY_EXEC = 1 << 14,
57 SEPARATE_FOLDER = 1 << 0,
58 SEPARATE_MESSAGE = 1 << 1,
59 SEPARATE_BOTH = (SEPARATE_FOLDER | SEPARATE_MESSAGE)
85 GtkWidget *messagewin;
90 GtkWidget *messagewin;
98 GtkItemFactory *menu_factory;
100 /* Toolbar handlebox */
101 GtkWidget *handlebox;
105 GtkWidget *vbox_body;
106 GtkWidget *hbox_stat;
107 GtkWidget *statusbar;
108 GtkWidget *progressbar;
109 GtkWidget *statuslabel;
110 GtkWidget *ac_button;
113 GtkWidget *online_switch;
114 GtkWidget *offline_switch;
115 GtkWidget *online_pixmap;
116 GtkWidget *offline_pixmap;
118 /* context IDs for status bar */
121 gint summaryview_cid;
122 gint messageview_cid;
124 ToolbarStyle toolbar_style;
127 guint menu_lock_count;
130 FolderView *folderview;
131 SummaryView *summaryview;
132 MessageView *messageview;
135 gint progressindicator_hook;
138 MainWindow *main_window_create (SeparateType type);
140 void main_window_destroy (MainWindow *mainwin);
142 void main_window_update_actions_menu (MainWindow *mainwin);
144 void main_window_cursor_wait (MainWindow *mainwin);
145 void main_window_cursor_normal (MainWindow *mainwin);
147 void main_window_lock (MainWindow *mainwin);
148 void main_window_unlock (MainWindow *mainwin);
150 void main_window_reflect_prefs_all_real (gboolean pixmap_theme_changed);
151 void main_window_reflect_prefs_all (void);
152 void main_window_set_summary_column (void);
153 void main_window_set_folder_column (void);
154 void main_window_set_account_menu (GList *account_list);
156 GtkWidget *main_window_get_folder_window (MainWindow *mainwin);
157 GtkWidget *main_window_get_message_window (MainWindow *mainwin);
159 void main_window_separation_change (MainWindow *mainwin,
162 void main_window_toggle_message_view (MainWindow *mainwin);
164 void main_window_get_size (MainWindow *mainwin);
165 void main_window_get_position (MainWindow *mainwin);
167 void main_window_progress_on (MainWindow *mainwin);
168 void main_window_progress_off (MainWindow *mainwin);
169 void main_window_progress_set (MainWindow *mainwin,
173 void main_window_empty_trash (MainWindow *mainwin,
175 void main_window_add_mailbox (MainWindow *mainwin);
177 void main_window_set_menu_sensitive (MainWindow *mainwin);
180 void main_window_show (MainWindow *mainwin);
181 void main_window_hide (MainWindow *mainwin);
182 void main_window_popup (MainWindow *mainwin);
184 void main_window_toolbar_set_compose_button (MainWindow *mainwin,
185 ComposeButtonType compose_btn_type);
187 SensitiveCond main_window_get_current_state (MainWindow *mainwin);
189 void toolbar_set_compose_button (Toolbar *toolbar,
190 ComposeButtonType compose_btn_type);
191 void main_window_destroy_all (void);
193 void main_window_toggle_work_offline (MainWindow *mainwin,
197 /* public so it can be disabled from summaryview */
198 gboolean mainwindow_key_pressed (GtkWidget *widget,
201 MainWindow *mainwindow_get_mainwindow (void);
202 #endif /* __MAINWINDOW_H__ */