X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fwidgets%2Fmodest-msg-view.h;h=0d73921c56675bd7b36f0181d5f38291a91378ea;hb=703965f6f52fab28c9762f1b5603c6feeec5a680;hp=e062027b3947fcbe653961fcdacee514fd3d8ebb;hpb=82819f280cb7939e58c95d6b70840816ebac780c;p=modest diff --git a/src/widgets/modest-msg-view.h b/src/widgets/modest-msg-view.h index e062027..0d73921 100644 --- a/src/widgets/modest-msg-view.h +++ b/src/widgets/modest-msg-view.h @@ -27,17 +27,14 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* modest-tny-msg-view.h */ - #ifndef __MODEST_MSG_VIEW_H__ #define __MODEST_MSG_VIEW_H__ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include G_BEGIN_DECLS @@ -53,22 +50,31 @@ typedef struct _ModestMsgView ModestMsgView; typedef struct _ModestMsgViewClass ModestMsgViewClass; struct _ModestMsgView { - GtkScrolledWindow parent; + GtkContainer parent; }; struct _ModestMsgViewClass { - GtkScrolledWindowClass parent_class; + GtkContainerClass parent_class; + void (*set_scroll_adjustments) (ModestMsgView *msg_view, + GtkAdjustment *hadj, + GtkAdjustment *vadj); + void (*link_hover) (ModestMsgView *msgview, const gchar* link, gpointer user_data); void (*link_clicked) (ModestMsgView *msgview, const gchar* link, gpointer user_data); - void (*attachment_clicked) (ModestMsgView *msgview, int index, + void (*link_contextual) (ModestMsgView *msgview, const gchar* link, + gpointer user_data); + void (*attachment_clicked) (ModestMsgView *msgview, TnyMimePart *mime_part, + gpointer user_data); + void (*recpt_activated) (ModestMsgView *msgview, const gchar *address, gpointer user_data); }; /** + * * modest_msg_view_get_type * * get the GType for the this class @@ -80,7 +86,7 @@ GType modest_msg_view_get_type (void) G_GNUC_CONST; /** * modest_msg_view_new - * @tny_msg: a TnyMsgIface instance, or NULL + * @tny_msg: a TnyMsg instance, or NULL * * create a new ModestMsgView widget (a GtkScrolledWindow subclass), * and display the @tny_msg e-mail message in it. If @tny_msg is NULL, @@ -88,28 +94,50 @@ GType modest_msg_view_get_type (void) G_GNUC_CONST; * * Returns: a new ModestMsgView widget, or NULL if there's an error */ -GtkWidget* modest_msg_view_new (TnyMsgIface *tny_msg); +GtkWidget* modest_msg_view_new (TnyMsg *tny_msg); /** * modest_msg_view_set_message * @self: a ModestMsgView instance - * @tny_msg: a TnyMsgIface instance, or NULL + * @tny_msg: a TnyMsg instance, or NULL * * display the @tny_msg e-mail message. If @tny_msg is NULL, * then a blank page will be displayed * */ -void modest_msg_view_set_message (ModestMsgView *self, TnyMsgIface *tny_msg); +void modest_msg_view_set_message (ModestMsgView *self, TnyMsg *tny_msg); + + /** - * modest_msg_view_get_selected_text: + * modest_msg_view_set_message * @self: a ModestMsgView instance - * - * get the user selected part of the message - * - * Returns: a newly allocated string of the user's selection or NULL if nothing is selected + * + * gets a new reference the #TnyMsg of the message view. The caller + * must free the new reference + * + * Returns: the message or NULL */ -gchar * modest_msg_view_get_selected_text (ModestMsgView *self); +TnyMsg* modest_msg_view_get_message (ModestMsgView *self); + +GtkAdjustment *modest_msg_view_get_vadjustment (ModestMsgView *self); +GtkAdjustment *modest_msg_view_get_hadjustment (ModestMsgView *self); +void modest_msg_view_set_vadjustment (ModestMsgView *self, GtkAdjustment *vadj); +void modest_msg_view_set_hadjustment (ModestMsgView *self, GtkAdjustment *hadj); +void modest_msg_view_set_shadow_type (ModestMsgView *self, GtkShadowType type); +GtkShadowType modest_msg_view_get_shadow_type (ModestMsgView *self); + +gboolean modest_msg_view_search (ModestMsgView *self, const gchar *search); +gboolean modest_msg_view_search_next (ModestMsgView *self); +void modest_msg_view_set_zoom (ModestMsgView *self, gdouble zoom); +gdouble modest_msg_view_get_zoom (ModestMsgView *self); +TnyHeaderFlags modest_msg_view_get_priority (ModestMsgView *self); +void modest_msg_view_set_priority (ModestMsgView *self, TnyHeaderFlags flags); +GList *modest_msg_view_get_selected_attachments (ModestMsgView *self); +GList *modest_msg_view_get_attachments (ModestMsgView *self); +void modest_msg_view_grab_focus (ModestMsgView *self); +void modest_msg_view_remove_attachment (ModestMsgView *view, TnyMimePart *attachment); + G_END_DECLS