1 /* modest-tny-msg-view.h */
2 /* insert (c)/licensing information) */
4 #ifndef __MODEST_TNY_MSG_VIEW_H__
5 #define __MODEST_TNY_MSG_VIEW_H__
9 #include <tny-stream-iface.h>
10 #include <tny-msg-iface.h>
11 #include <tny-msg-mime-part-iface.h>
13 #include "modest-conf.h"
17 /* convenience macros */
18 #define MODEST_TYPE_TNY_MSG_VIEW (modest_tny_msg_view_get_type())
19 #define MODEST_TNY_MSG_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_TNY_MSG_VIEW,ModestTnyMsgView))
20 #define MODEST_TNY_MSG_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_TNY_MSG_VIEW,ModestTnyMsgViewClass))
21 #define MODEST_IS_TNY_MSG_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_TNY_MSG_VIEW))
22 #define MODEST_IS_TNY_MSG_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_TNY_MSG_VIEW))
23 #define MODEST_TNY_MSG_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_TNY_MSG_VIEW,ModestTnyMsgViewClass))
25 typedef struct _ModestTnyMsgView ModestTnyMsgView;
26 typedef struct _ModestTnyMsgViewClass ModestTnyMsgViewClass;
28 struct _ModestTnyMsgView {
29 GtkScrolledWindow parent;
32 struct _ModestTnyMsgViewClass {
33 GtkScrolledWindowClass parent_class;
34 void (*mailto_clicked) (GtkWidget *widget, gpointer user_data);
39 * modest_tny_msg_view_get_type
41 * get the GType for the this class
43 * Returns: the GType for this class
45 GType modest_tny_msg_view_get_type (void) G_GNUC_CONST;
49 * modest_tny_msg_view_new
50 * @tny_msg: a TnyMsgIface instance, or NULL
52 * create a new ModestTnyMsgView widget (a GtkScrolledWindow subclass),
53 * and display the @tny_msg e-mail message in it. If @tny_msg is NULL,
54 * then a blank page will be displayed
56 * Returns: a new ModestTnyMsgView widget, or NULL if there's an error
58 GtkWidget* modest_tny_msg_view_new (TnyMsgIface *tny_msg, gboolean show_attachments_inline);
62 * modest_tny_msg_view_set_message
63 * @self: a ModestTnyMsgView instance
64 * @tny_msg: a TnyMsgIface instance, or NULL
66 * display the @tny_msg e-mail message. If @tny_msg is NULL,
67 * then a blank page will be displayed
69 void modest_tny_msg_view_set_message (ModestTnyMsgView *self,
70 TnyMsgIface *tny_msg);
73 * modest_tny_msg_view_redraw
74 * @self: a ModestTnyMsgView instance
76 * re-display the current e-mail message.
78 void modest_tny_msg_view_redraw (ModestTnyMsgView *self);
82 * modest_tny_msg_view_get_selected_text:
83 * @self: a ModestTnyMsgView instance
85 * get the user selected part of the message
87 * Returns: a newly allocated string of the user's selection or NULL if nothing is selected
89 gchar * modest_tny_msg_view_get_selected_text (ModestTnyMsgView *self);
91 gboolean modest_tny_msg_view_get_show_attachments_inline_flag (ModestTnyMsgView *self);
93 gboolean modest_tny_msg_view_set_show_attachments_inline_flag (ModestTnyMsgView *self, gboolean flag);
97 #endif /* __MODEST_TNY_MSG_VIEW_H__ */