1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2010 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __MAINWINDOW_H__
#define __MAINWINDOW_H__
#include <glib.h>
#include <gtk/gtkwidget.h>
#include <gtk/gtkitemfactory.h>
#include <gtk/gtktooltips.h>
typedef struct _MainWindow MainWindow;
#include "enums.h"
#include "folderview.h"
#include "summaryview.h"
#include "headerview.h"
#include "messageview.h"
#include "logwindow.h"
#include "trayicon.h"
#include "gtkutils.h"
typedef enum
{
SEPARATE_NONE = 0,
SEPARATE_FOLDER = 1 << 0,
SEPARATE_MESSAGE = 1 << 1,
SEPARATE_BOTH = (SEPARATE_FOLDER | SEPARATE_MESSAGE)
} SeparateType;
struct _MainWindow
{
SeparateType type;
union CompositeWin {
struct
{
GtkWidget *hpaned;
GtkWidget *vpaned;
} sep_none;
struct {
GtkWidget *folderwin;
GtkWidget *vpaned;
} sep_folder;
struct {
GtkWidget *messagewin;
GtkWidget *hpaned;
} sep_message;
struct {
GtkWidget *folderwin;
GtkWidget *messagewin;
} sep_both;
} win;
GtkWidget *window;
GtkWidget *vbox;
GtkWidget *menubar;
GtkItemFactory *menu_factory;
/* toolbar */
GtkWidget *toolbar;
GtkWidget *get_btn;
GtkWidget *getall_btn;
GtkWidget *rpop3_btn;
GtkWidget *send_btn;
GtkWidget *compose_btn;
GtkWidget *reply_btn;
ComboButton *reply_combo;
GtkWidget *replyall_btn;
GtkWidget *fwd_btn;
ComboButton *fwd_combo;
GtkWidget *delete_btn;
GtkWidget *junk_btn;
GtkWidget *notjunk_btn;
GtkWidget *exec_btn;
GtkWidget *next_btn;
GtkWidget *prev_btn;
GtkWidget *address_btn;
GtkWidget *search_btn;
GtkWidget *print_btn;
GtkWidget *stop_btn;
GtkWidget *prefs_common_btn;
GtkWidget *prefs_account_btn;
/* body */
GtkWidget *vbox_body;
GtkWidget *statusbar;
GtkWidget *progressbar;
GtkWidget *statuslabel;
GtkWidget *online_switch;
GtkWidget *online_pixmap;
GtkWidget *offline_pixmap;
GtkTooltips *online_tip;
GtkWidget *ac_button;
GtkWidget *ac_label;
GtkWidget *ac_menu;
TrayIcon *tray_icon;
/* context IDs for status bar */
gint mainwin_cid;
gint folderview_cid;
gint summaryview_cid;
gint messageview_cid;
ToolbarStyle toolbar_style;
guint lock_count;
guint menu_lock_count;
guint cursor_count;
gboolean window_hidden;
gboolean window_obscured;
FolderView *folderview;
SummaryView *summaryview;
MessageView *messageview;
LogWindow *logwin;
};
MainWindow *main_window_create (SeparateType type);
void main_window_cursor_wait (MainWindow *mainwin);
void main_window_cursor_normal (MainWindow *mainwin);
void main_window_lock (MainWindow *mainwin);
void main_window_unlock (MainWindow *mainwin);
void main_window_reflect_prefs_all (void);
void main_window_set_summary_column (void);
void main_window_set_account_menu (GList *account_list);
void main_window_change_cur_account (void);
MainWindow *main_window_get (void);
GtkWidget *main_window_get_folder_window (MainWindow *mainwin);
GtkWidget *main_window_get_message_window (MainWindow *mainwin);
void main_window_hide (MainWindow *mainwin);
void main_window_change_layout (MainWindow *mainwin,
LayoutType layout,
SeparateType type);
void main_window_toggle_message_view (MainWindow *mainwin);
void main_window_get_size (MainWindow *mainwin);
void main_window_get_position (MainWindow *mainwin);
void main_window_progress_on (MainWindow *mainwin);
void main_window_progress_off (MainWindow *mainwin);
void main_window_progress_set (MainWindow *mainwin,
gint cur,
gint total);
void main_window_progress_show (gint cur,
gint total);
void main_window_toggle_online (MainWindow *mainwin,
gboolean online);
gboolean main_window_toggle_online_if_offline (MainWindow *mainwin);
void main_window_empty_trash (MainWindow *mainwin,
gboolean confirm);
void main_window_add_mailbox (MainWindow *mainwin);
void main_window_send_queue (MainWindow *mainwin);
void main_window_set_toolbar_sensitive (MainWindow *mainwin);
void main_window_set_menu_sensitive (MainWindow *mainwin);
void main_window_popup (MainWindow *mainwin);
#endif /* __MAINWINDOW_H__ */
|