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