#ifndef __MODEST_MSG_VIEW_H__
#define __MODEST_MSG_VIEW_H__
-#include <gtk/gtk.h>
#include <tny-stream.h>
#include <tny-msg.h>
#include <tny-mime-part.h>
-#include <modest-conf.h>
+#include <tny-msg-view.h>
+#include <widgets/modest-recpt-view.h>
+#include <widgets/modest-zoomable.h>
G_BEGIN_DECLS
typedef struct _ModestMsgViewClass ModestMsgViewClass;
struct _ModestMsgView {
- GtkScrolledWindow parent;
+ GtkContainer parent;
};
struct _ModestMsgViewClass {
- GtkScrolledWindowClass parent_class;
-
+ GtkContainerClass parent_class;
+
+ /* TnyMimePartView interface */
+ TnyMimePart* (*get_part_func) (TnyMimePartView *self);
+ void (*set_part_func) (TnyMimePartView *self, TnyMimePart *part);
+ /* TnyMsgView interface */
+ TnyMsg* (*get_msg_func) (TnyMsgView *self);
+ void (*set_msg_func) (TnyMsgView *self, TnyMsg *msg);
+ void (*set_unavailable_func) (TnyMsgView *self);
+ void (*clear_func) (TnyMsgView *self);
+ TnyMimePartView* (*create_mime_part_view_for_func) (TnyMsgView *self, TnyMimePart *part);
+ TnyMsgView* (*create_new_inline_viewer_func) (TnyMsgView *self);
+ /* ModestZoomable interface */
+ gdouble (*get_zoom_func) (ModestZoomable *self);
+ void (*set_zoom_func) (ModestZoomable *self, gdouble value);
+ gboolean (*zoom_minus_func) (ModestZoomable *self);
+ gboolean (*zoom_plus_func) (ModestZoomable *self);
+
+ /* 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 (*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
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_get_selected_text:
+ * modest_msg_view_get_message_is_empty
* @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
+ *
+ * Returns whether the message contains any visbible (searchable) text.
+ * For instance, this will return FALSE if the message contains only markup.
+ *
+ * Returns: TRUE if the message contains visible text.
*/
-gchar * modest_msg_view_get_selected_text (ModestMsgView *self);
+gboolean modest_msg_view_get_message_is_empty (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);
+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