Updated Hungarian translation
[evolution.git] / composer / e-msg-composer.h
blobcf055d67c502a939c8ab8b8938764cc0ccf0d7bd
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * This program is free software; you can redistribute it and/or modify it
4 * under the terms of the GNU Lesser General Public License as published by
5 * the Free Software Foundation.
7 * This program is distributed in the hope that it will be useful, but
8 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
9 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
10 * for more details.
12 * You should have received a copy of the GNU Lesser General Public License
13 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 * Authors:
17 * Ettore Perazzoli <ettore@ximian.com>
19 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
23 #ifndef E_MSG_COMPOSER_H
24 #define E_MSG_COMPOSER_H
26 #include <camel/camel.h>
27 #include <libebook/libebook.h>
29 #include <shell/e-shell.h>
31 #include <composer/e-composer-header-table.h>
33 /* Standard GObject macros */
34 #define E_TYPE_MSG_COMPOSER \
35 (e_msg_composer_get_type ())
36 #define E_MSG_COMPOSER(obj) \
37 (G_TYPE_CHECK_INSTANCE_CAST \
38 ((obj), E_TYPE_MSG_COMPOSER, EMsgComposer))
39 #define E_MSG_COMPOSER_CLASS(cls) \
40 (G_TYPE_CHECK_CLASS_CAST \
41 ((cls), E_TYPE_MSG_COMPOSER, EMsgComposerClass))
42 #define E_IS_MSG_COMPOSER(obj) \
43 (G_TYPE_CHECK_INSTANCE_TYPE \
44 ((obj), E_TYPE_MSG_COMPOSER))
45 #define E_IS_MSG_COMPOSER_CLASS(cls) \
46 (G_TYPE_CHECK_CLASS_TYPE \
47 ((obj), E_TYPE_MSG_COMPOSER))
48 #define E_MSG_COMPOSER_GET_CLASS(obj) \
49 (G_TYPE_INSTANCE_GET_CLASS \
50 ((obj), E_TYPE_MSG_COMPOSER, EMsgComposerClass))
52 G_BEGIN_DECLS
54 typedef struct _EMsgComposer EMsgComposer;
55 typedef struct _EMsgComposerClass EMsgComposerClass;
56 typedef struct _EMsgComposerPrivate EMsgComposerPrivate;
58 struct _EMsgComposer {
59 GtkWindow parent;
60 EMsgComposerPrivate *priv;
63 struct _EMsgComposerClass {
64 GtkWindowClass parent_class;
66 /* Signals */
67 gboolean (*presend) (EMsgComposer *composer);
68 void (*print) (EMsgComposer *composer,
69 GtkPrintOperationAction print_action,
70 CamelMimeMessage *message,
71 EActivity *activity);
72 void (*save_to_drafts) (EMsgComposer *composer,
73 CamelMimeMessage *message,
74 EActivity *activity);
75 void (*save_to_outbox) (EMsgComposer *composer,
76 CamelMimeMessage *message,
77 EActivity *activity);
78 void (*send) (EMsgComposer *composer,
79 CamelMimeMessage *message,
80 EActivity *activity);
83 GType e_msg_composer_get_type (void);
84 EMsgComposer * e_msg_composer_new (EShell *shell);
85 EMsgComposer * e_msg_composer_new_with_message (EShell *shell,
86 CamelMimeMessage *message,
87 gboolean keep_signature,
88 const gchar *override_identity_uid,
89 GCancellable *cancellable);
90 EMsgComposer * e_msg_composer_new_from_url (EShell *shell,
91 const gchar *url);
92 EMsgComposer * e_msg_composer_new_redirect (EShell *shell,
93 CamelMimeMessage *message,
94 const gchar *identity_uid,
95 GCancellable *cancellable);
96 EHTMLEditor * e_msg_composer_get_editor (EMsgComposer *composer);
97 EFocusTracker * e_msg_composer_get_focus_tracker
98 (EMsgComposer *composer);
99 CamelSession * e_msg_composer_ref_session (EMsgComposer *composer);
100 EShell * e_msg_composer_get_shell (EMsgComposer *composer);
102 void e_msg_composer_send (EMsgComposer *composer);
103 void e_msg_composer_save_to_drafts (EMsgComposer *composer);
104 void e_msg_composer_save_to_outbox (EMsgComposer *composer);
105 void e_msg_composer_print (EMsgComposer *composer,
106 GtkPrintOperationAction print_action);
108 void e_msg_composer_set_body_text (EMsgComposer *composer,
109 const gchar *text,
110 gboolean update_signature);
111 void e_msg_composer_set_body (EMsgComposer *composer,
112 const gchar *body,
113 const gchar *mime_type);
114 void e_msg_composer_add_header (EMsgComposer *composer,
115 const gchar *name,
116 const gchar *value);
117 void e_msg_composer_set_header (EMsgComposer *composer,
118 const gchar *name,
119 const gchar *value);
120 const gchar * e_msg_composer_get_header (EMsgComposer *composer,
121 const gchar *name,
122 gint index);
123 void e_msg_composer_remove_header (EMsgComposer *composer,
124 const gchar *name);
125 void e_msg_composer_set_draft_headers
126 (EMsgComposer *composer,
127 const gchar *folder_uri,
128 const gchar *message_uid);
129 void e_msg_composer_set_source_headers
130 (EMsgComposer *composer,
131 const gchar *folder_uri,
132 const gchar *message_uid,
133 CamelMessageFlags flags);
134 void e_msg_composer_attach (EMsgComposer *composer,
135 CamelMimePart *mime_part);
136 void e_msg_composer_get_message (EMsgComposer *composer,
137 gint io_priority,
138 GCancellable *cancellable,
139 GAsyncReadyCallback callback,
140 gpointer user_data);
141 CamelMimeMessage *
142 e_msg_composer_get_message_finish
143 (EMsgComposer *composer,
144 GAsyncResult *result,
145 GError **error);
146 void e_msg_composer_get_message_print
147 (EMsgComposer *composer,
148 gint io_priority,
149 GCancellable *cancellable,
150 GAsyncReadyCallback callback,
151 gpointer user_data);
152 CamelMimeMessage *
153 e_msg_composer_get_message_print_finish
154 (EMsgComposer *composer,
155 GAsyncResult *result,
156 GError **error);
157 void e_msg_composer_get_message_draft
158 (EMsgComposer *composer,
159 gint io_priority,
160 GCancellable *cancellable,
161 GAsyncReadyCallback callback,
162 gpointer user_data);
163 CamelMimeMessage *
164 e_msg_composer_get_message_draft_finish
165 (EMsgComposer *composer,
166 GAsyncResult *result,
167 GError **error);
169 CamelInternetAddress *
170 e_msg_composer_get_from (EMsgComposer *composer);
171 CamelInternetAddress *
172 e_msg_composer_get_reply_to (EMsgComposer *composer);
174 void e_msg_composer_add_message_attachments
175 (EMsgComposer *composer,
176 CamelMimeMessage *message,
177 gboolean just_inlines);
179 void e_msg_composer_request_close (EMsgComposer *composer);
180 gboolean e_msg_composer_can_close (EMsgComposer *composer,
181 gboolean can_save_draft);
183 EComposerHeaderTable *
184 e_msg_composer_get_header_table (EMsgComposer *composer);
185 EAttachmentView *
186 e_msg_composer_get_attachment_view
187 (EMsgComposer *composer);
188 GByteArray * e_msg_composer_get_raw_message_text_without_signature
189 (EMsgComposer *composer);
190 GByteArray * e_msg_composer_get_raw_message_text
191 (EMsgComposer *composer);
193 gboolean e_msg_composer_is_exiting (EMsgComposer *composer);
195 void e_save_spell_languages (const GList *spell_languages);
196 void e_msg_composer_is_from_new_message
197 (EMsgComposer *composer,
198 gboolean is_from_new_message);
199 void e_msg_composer_save_focused_widget
200 (EMsgComposer *composer);
201 void e_msg_composer_restore_focus_on_composer
202 (EMsgComposer *composer);
203 gboolean e_msg_composer_is_busy (EMsgComposer *composer);
204 G_END_DECLS
206 #endif /* E_MSG_COMPOSER_H */