Updated Spanish translation
[evolution.git] / composer / e-msg-composer.h
blob42512b91419f9393ab9beabe7302ffdf2b39de99
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 void e_msg_composer_remove_header (EMsgComposer *composer,
121 const gchar *name);
122 void e_msg_composer_set_draft_headers
123 (EMsgComposer *composer,
124 const gchar *folder_uri,
125 const gchar *message_uid);
126 void e_msg_composer_set_source_headers
127 (EMsgComposer *composer,
128 const gchar *folder_uri,
129 const gchar *message_uid,
130 CamelMessageFlags flags);
131 void e_msg_composer_attach (EMsgComposer *composer,
132 CamelMimePart *mime_part);
133 void e_msg_composer_get_message (EMsgComposer *composer,
134 gint io_priority,
135 GCancellable *cancellable,
136 GAsyncReadyCallback callback,
137 gpointer user_data);
138 CamelMimeMessage *
139 e_msg_composer_get_message_finish
140 (EMsgComposer *composer,
141 GAsyncResult *result,
142 GError **error);
143 void e_msg_composer_get_message_print
144 (EMsgComposer *composer,
145 gint io_priority,
146 GCancellable *cancellable,
147 GAsyncReadyCallback callback,
148 gpointer user_data);
149 CamelMimeMessage *
150 e_msg_composer_get_message_print_finish
151 (EMsgComposer *composer,
152 GAsyncResult *result,
153 GError **error);
154 void e_msg_composer_get_message_draft
155 (EMsgComposer *composer,
156 gint io_priority,
157 GCancellable *cancellable,
158 GAsyncReadyCallback callback,
159 gpointer user_data);
160 CamelMimeMessage *
161 e_msg_composer_get_message_draft_finish
162 (EMsgComposer *composer,
163 GAsyncResult *result,
164 GError **error);
166 CamelInternetAddress *
167 e_msg_composer_get_from (EMsgComposer *composer);
168 CamelInternetAddress *
169 e_msg_composer_get_reply_to (EMsgComposer *composer);
171 void e_msg_composer_add_message_attachments
172 (EMsgComposer *composer,
173 CamelMimeMessage *message,
174 gboolean just_inlines);
176 void e_msg_composer_request_close (EMsgComposer *composer);
177 gboolean e_msg_composer_can_close (EMsgComposer *composer,
178 gboolean can_save_draft);
180 EComposerHeaderTable *
181 e_msg_composer_get_header_table (EMsgComposer *composer);
182 EAttachmentView *
183 e_msg_composer_get_attachment_view
184 (EMsgComposer *composer);
185 GByteArray * e_msg_composer_get_raw_message_text_without_signature
186 (EMsgComposer *composer);
187 GByteArray * e_msg_composer_get_raw_message_text
188 (EMsgComposer *composer);
190 gboolean e_msg_composer_is_exiting (EMsgComposer *composer);
192 void e_save_spell_languages (const GList *spell_languages);
193 void e_msg_composer_is_from_new_message
194 (EMsgComposer *composer,
195 gboolean is_from_new_message);
196 void e_msg_composer_save_focused_widget
197 (EMsgComposer *composer);
198 void e_msg_composer_restore_focus_on_composer
199 (EMsgComposer *composer);
200 gboolean e_msg_composer_is_busy (EMsgComposer *composer);
201 G_END_DECLS
203 #endif /* E_MSG_COMPOSER_H */