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;
38 * modest_tny_msg_view_get_type
40 * get the GType for the this class
42 * Returns: the GType for this class
44 GType modest_tny_msg_view_get_type (void) G_GNUC_CONST;
48 * modest_tny_msg_view_new
49 * @tny_msg: a TnyMsgIface instance, or NULL
51 * create a new ModestTnyMsgView widget (a GtkScrolledWindow subclass),
52 * and display the @tny_msg e-mail message in it. If @tny_msg is NULL,
53 * then a blank page will be displayed
55 * Returns: a new ModestTnyMsgView widget, or NULL if there's an error
57 GtkWidget* modest_tny_msg_view_new (TnyMsgIface *tny_msg, gboolean show_attachments_inline);
61 * modest_tny_msg_view_set_message
62 * @self: a ModestTnyMsgView instance
63 * @tny_msg: a TnyMsgIface instance, or NULL
65 * display the @tny_msg e-mail message. If @tny_msg is NULL,
66 * then a blank page will be displayed
68 void modest_tny_msg_view_set_message (ModestTnyMsgView *self,
69 TnyMsgIface *tny_msg);
72 * modest_tny_msg_view_redraw
73 * @self: a ModestTnyMsgView instance
75 * re-display the current e-mail message.
77 void modest_tny_msg_view_redraw (ModestTnyMsgView *self);
81 * modest_tny_msg_view_get_selected_text:
82 * @self: a ModestTnyMsgView instance
84 * get the user selected part of the message
86 * Returns: a newly allocated string of the user's selection or NULL if nothing is selected
88 gchar * modest_tny_msg_view_get_selected_text (ModestTnyMsgView *self);
90 gboolean modest_tny_msg_view_get_show_attachments_inline_flag (ModestTnyMsgView *self);
92 gboolean modest_tny_msg_view_set_show_attachments_inline_flag (ModestTnyMsgView *self, gboolean flag);
96 #endif /* __MODEST_TNY_MSG_VIEW_H__ */