X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fwidgets%2Fmodest-msg-view.h;h=0ee8b1caebb5e6883b7c252072ba11f6f1339fb0;hp=29596afae6abeb45d4a00d8455d23e998173328b;hb=db0da32bb0fd3bbad561aa48f4b00b47d887d508;hpb=0b620b502dca95166c87ca69323740913d652fbb diff --git a/src/widgets/modest-msg-view.h b/src/widgets/modest-msg-view.h index 29596af..0ee8b1c 100644 --- a/src/widgets/modest-msg-view.h +++ b/src/widgets/modest-msg-view.h @@ -34,42 +34,60 @@ #include #include #include +#include #include +#include +#include +#include G_BEGIN_DECLS /* convenience macros */ #define MODEST_TYPE_MSG_VIEW (modest_msg_view_get_type()) #define MODEST_MSG_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_MSG_VIEW,ModestMsgView)) -#define MODEST_MSG_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_MSG_VIEW,ModestMsgViewClass)) #define MODEST_IS_MSG_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_MSG_VIEW)) -#define MODEST_IS_MSG_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_MSG_VIEW)) -#define MODEST_MSG_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_MSG_VIEW,ModestMsgViewClass)) +#define MODEST_MSG_VIEW_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj),MODEST_TYPE_MSG_VIEW,ModestMsgViewIface)) typedef struct _ModestMsgView ModestMsgView; -typedef struct _ModestMsgViewClass ModestMsgViewClass; - -struct _ModestMsgView { - GtkContainer parent; -}; - -struct _ModestMsgViewClass { - GtkContainerClass parent_class; - +typedef struct _ModestMsgViewIface ModestMsgViewIface; + +struct _ModestMsgViewIface { + GTypeInterface parent; + + void (*set_msg_with_other_body_func) (ModestMsgView *self, TnyMsg *msg, TnyMimePart *other_body); + GtkAdjustment* (*get_vadjustment_func) (ModestMsgView *self); + GtkAdjustment* (*get_hadjustment_func) (ModestMsgView *self); + void (*set_vadjustment_func) (ModestMsgView *self, GtkAdjustment *vadj); + void (*set_hadjustment_func) (ModestMsgView *self, GtkAdjustment *vadj); + void (*set_shadow_type_func) (ModestMsgView *self, GtkShadowType type); + GtkShadowType (*get_shadow_type_func) (ModestMsgView *self); + TnyHeaderFlags (*get_priority_func) (ModestMsgView *self); + void (*set_priority_func) (ModestMsgView *self, TnyHeaderFlags flags); + void (*set_view_images_func) (ModestMsgView *self, gboolean view_images); + TnyList * (*get_selected_attachments_func) (ModestMsgView *self); + TnyList * (*get_attachments_func) (ModestMsgView *self); + void (*grab_focus_func) (ModestMsgView *self); + void (*remove_attachment_func) (ModestMsgView *view, TnyMimePart *attachment); + void (*set_branding_func) (ModestMsgView *view, const gchar *brand_name, const GdkPixbuf *brand_icon); + + /* signals */ 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 (*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); + gboolean (*fetch_image) (ModestMsgView *msgview, const gchar *uri, + TnyStream *stream); + void (*show_details) (ModestMsgView *msgview, gpointer userdata); + + void (*request_fetch_images_func) (ModestMsgView *msgview); + gboolean (*has_blocked_external_images_func) (ModestMsgView *msgview); + void (*limit_error) (ModestMsgView *msgview); }; @@ -77,49 +95,13 @@ struct _ModestMsgViewClass { * * modest_msg_view_get_type * - * get the GType for the this class + * get the GType for the this interface * - * Returns: the GType for this class + * Returns: the GType for this interface */ GType modest_msg_view_get_type (void) G_GNUC_CONST; - -/** - * modest_msg_view_new - * @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, - * then a blank page will be displayed - * - * Returns: a new ModestMsgView widget, or NULL if there's an error - */ -GtkWidget* modest_msg_view_new (TnyMsg *tny_msg); - - -/** - * modest_msg_view_set_message - * @self: a ModestMsgView instance - * @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, TnyMsg *tny_msg); - - - -/** - * modest_msg_view_set_message - * @self: a ModestMsgView instance - * - * gets a new reference the #TnyMsg of the message view. The caller - * must free the new reference - * - * Returns: the message or NULL - */ -TnyMsg* modest_msg_view_get_message (ModestMsgView *self); - +void modest_msg_view_set_msg_with_other_body (ModestMsgView *self, TnyMsg *msg, TnyMimePart *part); 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); @@ -127,14 +109,16 @@ 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); +TnyList *modest_msg_view_get_selected_attachments (ModestMsgView *self); +TnyList *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); +void modest_msg_view_set_branding (ModestMsgView *view, const gchar *brand_name, const GdkPixbuf *brand_icon); +void modest_msg_view_set_view_images (ModestMsgView *view, gboolean view_images); +void modest_msg_view_request_fetch_images (ModestMsgView *view); +gboolean modest_msg_view_has_blocked_external_images (ModestMsgView *view); G_END_DECLS