Fixes FwNULL 14/16
[modest] / src / widgets / modest-msg-view-window.h
index 9b1bae7..b0c8a43 100644 (file)
 
 #include <tny-msg.h>
 #include <tny-folder.h>
+#ifdef MODEST_TOOLKIT_HILDON2
+#include <modest-hildon2-window.h>
+#endif
 #include <widgets/modest-window.h>
+#include <widgets/modest-header-view.h>
 #include <gtk/gtktreemodel.h>
+#include <gtk/gtkenums.h>
 
 G_BEGIN_DECLS
 
@@ -47,16 +52,29 @@ G_BEGIN_DECLS
 
 
 typedef struct {
-        ModestWindow parent;
+#ifdef MODEST_TOOLKIT_HILDON2
+       ModestHildon2Window parent;
+#else
+       ModestWindow parent;
+#endif
 } ModestMsgViewWindow;
        
 typedef struct {
+#ifdef MODEST_TOOLKIT_HILDON2
+       ModestHildon2WindowClass parent_class;
+#else
        ModestWindowClass parent_class;
+#endif
 
        void (*msg_changed) (ModestMsgViewWindow *self,
                             GtkTreeModel *model,
                             GtkTreeRowReference *row_reference, 
                             gpointer user_data);
+
+       gboolean (*scroll_child) (ModestMsgViewWindow *self,
+                                  GtkScrollType scroll_type,
+                                  gboolean horizontal,
+                                  gpointer userdata);
 } ModestMsgViewWindowClass;
 
 /**
@@ -105,6 +123,25 @@ ModestWindow*   modest_msg_view_window_new_with_header_model (TnyMsg *msg,
                                                              GtkTreeModel *model, 
                                                              GtkTreeRowReference *row_reference);
 
+/**
+ * modest_msg_view_window_new_from_header_view:
+ * @header_view: an #ModestHeaderView instance
+ * @modest_account_name: the account name 
+ * @msg_uid: the initial uid reserved by this window
+ * @row_reference: a #GtkTreeRowReference, pointing to the selected position @model.
+ * 
+ * instantiates a new #ModestMsgViewWindow widget. The account name is used to
+ * set the proper account when choosing reply/forward from the msg view window.
+ * It's different from new_with_header_model, as it creates the window and then
+ * loads the message in that window.
+ *
+ * Returns: a new #ModestMsgViewWindow, or NULL in case of error
+ */
+ModestWindow*   modest_msg_view_window_new_from_header_view (ModestHeaderView *header_view, 
+                                                            const gchar *modest_account_name, 
+                                                            const gchar *msg_uid,
+                                                            GtkTreeRowReference *row_reference);
+
 
 /**
  * modest_msg_view_window_new_for_search_result:
@@ -286,6 +323,18 @@ modest_msg_view_window_get_folder_type (ModestMsgViewWindow *window);
 gboolean 
 modest_msg_view_window_transfer_mode_enabled (ModestMsgViewWindow *self);
 
+/**
+ * modest_msg_view_window_add_to_contacts:
+ * @self: a #ModestMsgViewWindow
+ *
+ * activates the add to contacts use case. In Diablo and gnome it gets the
+ * clipboard selection current value and tries to add it to the addressbook.
+ * In fremantle, it shows the add to contacts dialog to select the recipient
+ * to add.
+ */
+void
+modest_msg_view_window_add_to_contacts (ModestMsgViewWindow *self);
+
 G_END_DECLS
 
 #endif /* __MODEST_MSG_VIEW_WINDOW_H__ */