1 /* modest-tny-folder-tree-view.h */
2 /* insert (c)/licensing information) */
4 #ifndef __MODEST_TNY_FOLDER_TREE_VIEW_H__
5 #define __MODEST_TNY_FOLDER_TREE_VIEW_H__
7 #include <tny-account-tree-model.h>
8 #include <tny-account-store-iface.h>
9 #include <glib-object.h>
13 /* convenience macros */
14 #define MODEST_TYPE_TNY_FOLDER_TREE_VIEW (modest_tny_folder_tree_view_get_type())
15 #define MODEST_TNY_FOLDER_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_TNY_FOLDER_TREE_VIEW,ModestTnyFolderTreeView))
16 #define MODEST_TNY_FOLDER_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_TNY_FOLDER_TREE_VIEW,GObject))
17 #define MODEST_IS_TNY_FOLDER_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_TNY_FOLDER_TREE_VIEW))
18 #define MODEST_IS_TNY_FOLDER_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_TNY_FOLDER_TREE_VIEW))
19 #define MODEST_TNY_FOLDER_TREE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_TNY_FOLDER_TREE_VIEW,ModestTnyFolderTreeViewClass))
21 typedef struct _ModestTnyFolderTreeView ModestTnyFolderTreeView;
22 typedef struct _ModestTnyFolderTreeViewClass ModestTnyFolderTreeViewClass;
24 struct _ModestTnyFolderTreeView {
26 /* insert public members, if any */
29 struct _ModestTnyFolderTreeViewClass {
30 GtkTreeViewClass parent_class;
32 /* emitted when a folder is clicked */
33 void (*folder_selected) (ModestTnyFolderTreeView* self,
34 TnyMsgFolderIface *folder,
40 * modest_tny_folder_tree_view_get_type:
42 * get the GType for ModestTnyFolderTreeView
46 GType modest_tny_folder_tree_view_get_type (void) G_GNUC_CONST;
50 * modest_tny_folder_tree_view_new:
51 * @iface: a TnyAccountStoreIface object
53 * create a new ModestTnyFolderTreeView instance, based on an account store
55 * Returns: a new GtkWidget (a GtkTreeView-subclass)
58 GtkWidget* modest_tny_folder_tree_view_new (TnyAccountStoreIface *iface);
62 * modest_tny_folder_tree_view_is_empty:
63 * @self: a ModestTnyFolderTreeView instance
65 * check to see of the view is empty. Note that when it is empty,
66 * there will still be one item, telling "(empty)" or similar
68 * Returns: TRUE if the tree view is empty, FALSE otherwise
70 gboolean modest_tny_folder_tree_view_is_empty (ModestTnyFolderTreeView *self);
75 #endif /* __MODEST_TNY_FOLDER_TREE_VIEW_H__ */