2 /* insert (c)/licensing information) */
4 #ifndef __MODEST_UI_H__
5 #define __MODEST_UI_H__
7 #include <glib-object.h>
8 #include <gtk/gtkcontainer.h>
9 #include "modest-conf.h"
10 #include "modest-tny-msg-view.h"
14 /* convenience macros */
15 #define MODEST_TYPE_UI (modest_ui_get_type())
16 #define MODEST_UI(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_UI,ModestUI))
17 #define MODEST_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_UI,GObject))
18 #define MODEST_IS_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_UI))
19 #define MODEST_IS_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_UI))
20 #define MODEST_UI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_UI,ModestUIClass))
22 typedef struct _ModestUI ModestUI;
23 typedef struct _ModestUIClass ModestUIClass;
27 /* insert public members, if any */
30 struct _ModestUIClass {
31 GObjectClass parent_class;
32 /* insert signal callback declarations, eg. */
33 /* void (* my_event) (ModestUI* obj); */
40 * get the GType for ModestUI
44 GType modest_ui_get_type (void) G_GNUC_CONST;
50 * @modest_conf: a ModestConf instance
52 * Returns: a new ModestUI, or NULL in case of error
54 GObject* modest_ui_new (ModestConf *modest_conf);
58 * modest_ui_show_main_window:
59 * @ui: a ModestUI instance
61 * show the application's main window
63 * Returns: TRUE if succeeded, FALSE otherwise
65 gboolean modest_ui_show_main_window (ModestUI *ui);
69 * modest_ui_new_edit_window:
70 * @ui: a ModestUI instance
71 * @to: people to send this to, ';' separated
72 * @cc: people to send carbon-copies (cc), ';' separated
73 * @bcc people to send blind-carbon-copies (bcc),';' separated
74 * @subject: the subject of the message
75 * @body: the body text of the message
76 * @att: a list with the filepaths for attachments
78 * Returns: TRUE if succeeded, FALSE otherwise
80 gboolean modest_ui_new_edit_window (ModestUI *ui,
89 GtkContainer *modest_ui_new_editor_window (ModestUI *modest_ui, gpointer *user_data);
91 gboolean modest_ui_editor_window_set_to_header(const gchar *to, gpointer window_data);
92 gboolean modest_ui_editor_window_set_cc_header(const gchar *cc, gpointer window_data);
93 gboolean modest_ui_editor_window_set_bcc_header(const gchar *bcc, gpointer window_data);
94 gboolean modest_ui_editor_window_set_subject_header(const gchar *subject, gpointer window_data);
95 gboolean modest_ui_editor_window_set_body(const gchar *body, gpointer window_data);
96 gboolean modest_ui_editor_window_update_attachments(gpointer window_data);
98 GtkContainer *modest_ui_new_viewer_window (ModestUI *modest_ui, GtkWidget *msg_view, TnyMsgIface *msg, gpointer *user_data);
102 #endif /* __MODEST_UI_H__ */