summaryrefslogtreecommitdiff
path: root/src/mainwindow.h
diff options
context:
space:
mode:
authorSimeon Simeonov2018-02-26 11:23:00 +0100
committerSimeon Simeonov2018-02-26 11:23:00 +0100
commit0b3cbf57875fd692e4ba0b336fefa4bee1ed00dc (patch)
treeaf916a30553c78ce9d4f2d8658656a175c5b6921 /src/mainwindow.h
Initial commit for sylpheed 3.7.0
Diffstat (limited to 'src/mainwindow.h')
-rw-r--r--src/mainwindow.h192
1 files changed, 192 insertions, 0 deletions
diff --git a/src/mainwindow.h b/src/mainwindow.h
new file mode 100644
index 0000000..bc0107d
--- /dev/null
+++ b/src/mainwindow.h
@@ -0,0 +1,192 @@
1/*
2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2012 Hiroyuki Yamamoto
4 *
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.
9 *
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.
14 *
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */
19
20#ifndef __MAINWINDOW_H__
21#define __MAINWINDOW_H__
22
23#include <glib.h>
24#include <gtk/gtkwidget.h>
25#include <gtk/gtkitemfactory.h>
26#include <gtk/gtktooltips.h>
27
28typedef struct _MainWindow MainWindow;
29
30#include "enums.h"
31#include "folderview.h"
32#include "summaryview.h"
33#include "headerview.h"
34#include "messageview.h"
35#include "logwindow.h"
36#include "trayicon.h"
37#include "gtkutils.h"
38
39typedef enum
40{
41 SEPARATE_NONE = 0,
42 SEPARATE_FOLDER = 1 << 0,
43 SEPARATE_MESSAGE = 1 << 1,
44 SEPARATE_BOTH = (SEPARATE_FOLDER | SEPARATE_MESSAGE)
45} SeparateType;
46
47struct _MainWindow
48{
49 SeparateType type;
50
51 union CompositeWin {
52 struct
53 {
54 GtkWidget *hpaned;
55 GtkWidget *vpaned;
56 } sep_none;
57 struct {
58 GtkWidget *folderwin;
59 GtkWidget *vpaned;
60 } sep_folder;
61 struct {
62 GtkWidget *messagewin;
63 GtkWidget *hpaned;
64 } sep_message;
65 struct {
66 GtkWidget *folderwin;
67 GtkWidget *messagewin;
68 } sep_both;
69 } win;
70
71 GtkWidget *window;
72 GtkWidget *vbox;
73 GtkWidget *menubar;
74
75 GtkItemFactory *menu_factory;
76
77 /* toolbar */
78 GtkWidget *toolbar;
79 GtkWidget *get_btn;
80 GtkWidget *getall_btn;
81 GtkWidget *rpop3_btn;
82 GtkWidget *send_btn;
83 GtkWidget *compose_btn;
84 GtkWidget *reply_btn;
85 ComboButton *reply_combo;
86 GtkWidget *replyall_btn;
87 GtkWidget *fwd_btn;
88 ComboButton *fwd_combo;
89 GtkWidget *delete_btn;
90 GtkWidget *junk_btn;
91 GtkWidget *notjunk_btn;
92 GtkWidget *exec_btn;
93 GtkWidget *next_btn;
94 GtkWidget *prev_btn;
95 GtkWidget *address_btn;
96 GtkWidget *search_btn;
97 GtkWidget *print_btn;
98 GtkWidget *stop_btn;
99 GtkWidget *prefs_common_btn;
100 GtkWidget *prefs_account_btn;
101
102 /* body */
103 GtkWidget *vbox_body;
104 GtkWidget *statusbar;
105 GtkWidget *progressbar;
106 GtkWidget *statuslabel;
107 GtkWidget *online_switch;
108 GtkWidget *online_pixmap;
109 GtkWidget *offline_pixmap;
110 GtkTooltips *online_tip;
111 GtkWidget *ac_button;
112 GtkWidget *ac_label;
113 GtkWidget *ac_menu;
114
115 TrayIcon *tray_icon;
116
117 /* context IDs for status bar */
118 gint mainwin_cid;
119 gint folderview_cid;
120 gint summaryview_cid;
121 gint messageview_cid;
122
123 ToolbarStyle toolbar_style;
124
125 guint lock_count;
126 guint menu_lock_count;
127 guint cursor_count;
128
129 gboolean window_hidden;
130 gboolean window_obscured;
131
132 FolderView *folderview;
133 SummaryView *summaryview;
134 MessageView *messageview;
135 LogWindow *logwin;
136
137 GtkTooltips *toolbar_tip;
138};
139
140MainWindow *main_window_create (SeparateType type);
141
142void main_window_cursor_wait (MainWindow *mainwin);
143void main_window_cursor_normal (MainWindow *mainwin);
144
145void main_window_lock (MainWindow *mainwin);
146void main_window_unlock (MainWindow *mainwin);
147
148void main_window_reflect_prefs_all (void);
149void main_window_set_summary_column (void);
150void main_window_set_account_menu (GList *account_list);
151
152void main_window_change_cur_account (void);
153
154MainWindow *main_window_get (void);
155
156GtkWidget *main_window_get_folder_window (MainWindow *mainwin);
157GtkWidget *main_window_get_message_window (MainWindow *mainwin);
158
159void main_window_hide (MainWindow *mainwin);
160void main_window_change_layout (MainWindow *mainwin,
161 LayoutType layout,
162 SeparateType type);
163
164void main_window_toggle_message_view (MainWindow *mainwin);
165
166void main_window_get_size (MainWindow *mainwin);
167void main_window_get_position (MainWindow *mainwin);
168
169void main_window_progress_on (MainWindow *mainwin);
170void main_window_progress_off (MainWindow *mainwin);
171void main_window_progress_set (MainWindow *mainwin,
172 gint cur,
173 gint total);
174
175void main_window_progress_show (gint cur,
176 gint total);
177
178void main_window_toggle_online (MainWindow *mainwin,
179 gboolean online);
180gboolean main_window_toggle_online_if_offline (MainWindow *mainwin);
181
182void main_window_empty_trash (MainWindow *mainwin,
183 gboolean confirm);
184void main_window_add_mailbox (MainWindow *mainwin);
185void main_window_send_queue (MainWindow *mainwin);
186
187void main_window_set_toolbar_sensitive (MainWindow *mainwin);
188void main_window_set_menu_sensitive (MainWindow *mainwin);
189
190void main_window_popup (MainWindow *mainwin);
191
192#endif /* __MAINWINDOW_H__ */