* (quote) utf8 actually works now
[modest] / src / modest-tny-folder-tree-view.h
1 /* modest-tny-folder-tree-view.h */
2 /* insert (c)/licensing information) */
3
4 #ifndef __MODEST_TNY_FOLDER_TREE_VIEW_H__
5 #define __MODEST_TNY_FOLDER_TREE_VIEW_H__
6
7 #include <tny-account-tree-model.h>
8 #include <tny-account-store-iface.h>
9 #include <glib-object.h>
10
11 G_BEGIN_DECLS
12
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))
20
21 typedef struct _ModestTnyFolderTreeView      ModestTnyFolderTreeView;
22 typedef struct _ModestTnyFolderTreeViewClass ModestTnyFolderTreeViewClass;
23
24 struct _ModestTnyFolderTreeView {
25          GtkTreeView parent;
26         /* insert public members, if any */
27 };
28
29 struct _ModestTnyFolderTreeViewClass {
30         GtkTreeViewClass parent_class;
31
32         /* emitted when a folder is clicked */
33         void (*folder_selected) (ModestTnyFolderTreeView* self,
34                                  TnyMsgFolderIface *folder,
35                                  gpointer user_data);
36 };
37
38
39 /**
40  * modest_tny_folder_tree_view_get_type:
41  * 
42  * get the GType for ModestTnyFolderTreeView
43  *  
44  * Returns: the GType
45  */
46 GType        modest_tny_folder_tree_view_get_type    (void) G_GNUC_CONST;
47
48
49 /**
50  * modest_tny_folder_tree_view_new:
51  * @iface: a TnyAccountStoreIface object
52  * 
53  * create a new ModestTnyFolderTreeView instance, based on an account store
54  *  
55  * Returns: a new GtkWidget (a GtkTreeView-subclass)
56  */
57
58 GtkWidget*   modest_tny_folder_tree_view_new         (TnyAccountStoreIface *iface);
59
60
61 /**
62  * modest_tny_folder_tree_view_is_empty:
63  * @self: a ModestTnyFolderTreeView instance
64  * 
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
67  *  
68  * Returns: TRUE if the tree view is empty, FALSE otherwise
69  */
70 gboolean     modest_tny_folder_tree_view_is_empty    (ModestTnyFolderTreeView *self);
71
72
73 G_END_DECLS
74
75 #endif /* __MODEST_TNY_FOLDER_TREE_VIEW_H__ */
76