* Added an attribute sent to the msg edit window that specifies that the mail has...
[modest] / src / widgets / modest-header-view.h
index 7ea0647..1d0124e 100644 (file)
@@ -36,6 +36,7 @@
 #include <tny-msg.h>
 #include <tny-header.h>
 #include <tny-gtk-header-list-model.h>
+#include "modest-mail-operation.h"
 
 G_BEGIN_DECLS
 
@@ -153,7 +154,9 @@ GtkWidget*   modest_header_view_new        (TnyFolder *folder,
  * set the folder for this ModestHeaderView
  */
 void         modest_header_view_set_folder (ModestHeaderView *self,
-                                           TnyFolder *folder);
+                                           TnyFolder *folder,
+                                           RefreshAsyncUserCallback callback,
+                                           gpointer user_data);
 
 /**
  * modest_header_view_get_folder:
@@ -169,7 +172,7 @@ TnyFolder *modest_header_view_get_folder (ModestHeaderView *self);
 /**
  * modest_header_view_set_columns:
  * @self: a ModestHeaderView instance
- * @columns: a list of ModestHeaderViewColumn
+ * @columns: a list of gint ModestHeaderViewColumn column IDs, using GINT_TO_POINTER() and GPOINTER_TO_INT().
  * @type: #TnyFolderType type
  * 
  * set the columns for this ModestHeaderView.
@@ -217,6 +220,26 @@ gboolean   modest_header_view_set_style (ModestHeaderView *self,
 ModestHeaderViewStyle   modest_header_view_get_style (ModestHeaderView *self);
 
 /**
+ * modest_header_view_count_selected_headers:
+ * @self: a ModestHeaderView instance
+ * 
+ * Check selected headers counter. 
+ * Returns: the number of selected headers.
+ */
+guint
+modest_header_view_count_selected_headers (ModestHeaderView *self);
+
+/**
+ * modest_header_view_has_selected_headers:
+ * @self: a ModestHeaderView instance
+ * 
+ * Check if any row is selected on headers tree view. 
+ * Returns: TRUE if any header is selected, FALSE otherwise.
+ */
+gboolean
+modest_header_view_has_selected_headers (ModestHeaderView *self);
+
+/**
  * modest_header_view_get_selected_headers:
  * @self: a ModestHeaderView instance
  * 
@@ -315,6 +338,50 @@ modest_header_view_sort_by_column_id (ModestHeaderView *self,
                                      guint sort_colid,
                                      GtkSortType sort_type);
 
+/**
+ * modest_header_view_clear:
+ * @self: a #ModestHeaderView
+ *
+ * Clear the contents of a header view. It internally calls the
+ * set_folder function with last three arguments as NULL
+ **/
+void
+modest_header_view_clear (ModestHeaderView *self);
+
+/**
+ * modest_header_view_copy_selection:
+ * @self: a #ModestHeaderView
+ * 
+ * Stores a #TnyList of selected headers in the own clibpoard of 
+ * @self header view.
+ **/
+void 
+modest_header_view_copy_selection (ModestHeaderView *header_view);
+
+/**
+ * modest_header_view_cut_selection:
+ * @self: a #ModestHeaderView
+ * 
+ * Stores a #TnyList of selected headers in the own clibpoard of 
+ * @self header view and filter them into headers tree model to
+ * hide these rows in treeview.
+ **/
+void 
+modest_header_view_cut_selection (ModestHeaderView *header_view);
+
+
+/**
+ * modest_header_view_paste_selection:
+ * @self: a #ModestHeaderView
+ * @headers: ouput parameter with a #TnyList of headers which will be returned.
+ * @delete: output parameter with indication about delete or not the selected headers. 
+ * 
+ * Gets the selected headers to copy/cut.
+ **/
+void
+modest_header_view_paste_selection (ModestHeaderView *header_view,
+                                   TnyList **headers,
+                                   gboolean *delete);
 
 G_END_DECLS