2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2009 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 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/>.
23 typedef struct _Compose Compose;
24 typedef struct _AttachInfo AttachInfo;
31 #include "addressbook.h"
32 #include "prefs_account.h"
35 #include "messageview.h"
42 #include "gtkaspell.h"
45 #define COMPOSE_CHECK_BEFORE_SEND_HOOKLIST "compose_check_before_send"
60 COMPOSE_REPLY_WITH_QUOTE,
61 COMPOSE_REPLY_WITHOUT_QUOTE,
62 COMPOSE_REPLY_TO_SENDER,
63 COMPOSE_FOLLOWUP_AND_REPLY_TO,
64 COMPOSE_REPLY_TO_SENDER_WITH_QUOTE,
65 COMPOSE_REPLY_TO_SENDER_WITHOUT_QUOTE,
67 COMPOSE_REPLY_TO_ALL_WITH_QUOTE,
68 COMPOSE_REPLY_TO_ALL_WITHOUT_QUOTE,
69 COMPOSE_REPLY_TO_LIST,
70 COMPOSE_REPLY_TO_LIST_WITH_QUOTE,
71 COMPOSE_REPLY_TO_LIST_WITHOUT_QUOTE,
73 COMPOSE_FORWARD_AS_ATTACH,
74 COMPOSE_FORWARD_INLINE,
91 /* start with window widget don`t change order */
96 /* Toolbar handlebox */
103 GtkWidget *table_vbox;
105 GtkWidget *subject_entry;
109 GtkWidget *attach_scrwin;
110 GtkWidget *attach_clist;
111 GtkWidget *attach_label;
114 GtkWidget *savemsg_checkbtn;
115 GtkWidget *savemsg_combo;
117 /* Headers notebook */
121 GtkWidget *edit_vbox;
122 GtkWidget *ruler_hbox;
124 GtkWidget *scrolledwin;
126 GtkWidget *from_name;
127 #if !GTK_CHECK_VERSION(2,12,0)
128 GtkTooltips *tooltips;
131 GtkWidget *focused_editable;
133 GtkWidget *popupmenu;
135 GtkWidget *tmpl_menu;
141 MsgInfo *autosaved_draft;
144 GtkWidget *header_table;
146 guint header_nextrow;
147 ComposeHeaderEntry *header_last;
168 gboolean use_replyto;
169 gboolean use_newsgroups;
170 gboolean use_followupto;
173 CharSet out_encoding;
175 /* privacy settings */
176 gboolean use_signing;
177 gboolean use_encryption;
178 gchar *privacy_system;
184 gboolean return_receipt;
189 GSList *newsgroup_list;
191 PrefsAccount *account;
194 UndoMain *undostruct;
197 gboolean sig_inserted;
199 /* external editor */
200 gchar *exteditor_file;
202 GIOChannel *exteditor_ch;
208 gchar *redirect_filename;
210 gboolean remove_references;
212 guint draft_timeout_tag;
214 GtkTextTag *no_wrap_tag;
215 GtkTextTag *no_join_tag;
216 GtkTextTag *signature_tag;
217 GtkTextTag *quote0_tag;
218 GtkTextTag *quote1_tag;
219 GtkTextTag *quote2_tag;
222 gboolean automatic_break;
228 gboolean deferred_destroy;
230 GtkWidget *first_combo;
231 GtkWidget *first_entry;
233 GtkUIManager *ui_manager;
235 /* GNU/aspell spell checker */
236 GtkAspell *gtkaspell;
237 GtkWidget *aspell_options_menu;
245 EncodingType encoding;
252 COMPOSE_QUIT_EDITING,
253 COMPOSE_KEEP_EDITING,
255 COMPOSE_DRAFT_FOR_EXIT
256 } ComposeDraftAction;
258 /*#warning FIXME_GTK2 */
259 /* attache_files will be locale encode */
260 Compose *compose_new (PrefsAccount *account,
262 GPtrArray *attach_files);
264 Compose *compose_new_with_folderitem (PrefsAccount *account,
266 const gchar *mailto);
268 Compose *compose_new_with_list (PrefsAccount *account,
271 Compose *compose_forward (PrefsAccount *account,
278 Compose *compose_redirect (PrefsAccount *account,
281 Compose *compose_reedit (MsgInfo *msginfo,
284 GList *compose_get_compose_list (void);
286 void compose_entry_append (Compose *compose,
287 const gchar *address,
288 ComposeEntryType type);
291 gint compose_send (Compose *compose);
293 void compose_update_actions_menu (Compose *compose);
294 void compose_reflect_prefs_all (void);
295 void compose_reflect_prefs_pixmap_theme (void);
297 void compose_destroy_all (void);
298 gboolean compose_draft (gpointer data, guint action);
299 void compose_toolbar_cb (gint action,
301 void compose_reply_from_messageview (MessageView *msgview,
302 GSList *msginfo_list,
304 void compose_action_cb (void *data);
306 void compose_set_position (Compose *compose,
308 gboolean compose_search_string (Compose *compose,
311 gboolean compose_search_string_backward (Compose *compose,
314 gint compose_queue (Compose *compose,
318 gboolean remove_reedit_target);
319 gboolean compose_close (Compose *compose);
320 void compose_close_toolbar (Compose *compose);
321 void compose_clear_exit_drafts (void);
322 void compose_reopen_exit_drafts (void);
323 #endif /* __COMPOSE_H__ */