X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fwidgets%2Fmodest-account-view.h;h=e1dc2a06bcb620b2087fcb25ed7836d778644fa7;hp=2fe7c19d98672af1e43fa95c5a1fe15d1daf1681;hb=cb2af4c518371ac1af7c0fdd48cd2e979ae54753;hpb=08d116fb924bde1079b7c19fc1182d6e8c93be77 diff --git a/src/widgets/modest-account-view.h b/src/widgets/modest-account-view.h index 2fe7c19..e1dc2a0 100644 --- a/src/widgets/modest-account-view.h +++ b/src/widgets/modest-account-view.h @@ -30,9 +30,8 @@ #ifndef __MODEST_ACCOUNT_VIEW_H__ #define __MODEST_ACCOUNT_VIEW_H__ -#include -#include -#include +#include "modest-account-mgr.h" +#include G_BEGIN_DECLS @@ -49,20 +48,123 @@ typedef struct _ModestAccountViewClass ModestAccountViewClass; struct _ModestAccountView { GtkTreeView parent; - /* insert public members, if any */ }; struct _ModestAccountViewClass { GtkTreeViewClass parent_class; - /* insert signal callback declarations, eg. */ - /* void (* my_event) (ModestAccountView* obj); */ }; -/* member functions */ + +/** + * modest_account_view_get_type + * + * Gets the #GType for the account view class + * + * Returns: the #GType + **/ GType modest_account_view_get_type (void) G_GNUC_CONST; + +/** + * modest_account_view_new: + * @account_view: a #ModestAccountView + * + * Create a new acccount view widget = ie, a list with accounts + * + * Returns: a new account view widget, or NULL in case of error + **/ ModestAccountView* modest_account_view_new (ModestAccountMgr *account_mgr); + +/** + * modest_account_view_get_selected_account: + * @account_view: a #ModestAccountView + * + * Gets the name of the account currently selected + * + * Returns: the name of the selected account or NULL if none is + * selected + **/ +gchar* modest_account_view_get_selected_account (ModestAccountView *account_view); + +/** + * modest_account_view_get_path_account: + * @account_view: a #ModestAccountView + * @path: a #GtkTreePath + * + * Gets the name of the account pointed by @path + * + * Returns: the name of the account or NULL if no account in path + **/ +gchar * modest_account_view_get_path_account (ModestAccountView *self, GtkTreePath *path); + +/** + * modest_account_view_set_picker_mode: + * @self: a #ModestAccountView + * @enable: a #gboolean + * + * Sets the account view to be shown in picker mode (only names shown, centered). + * This is used in Hildon2.2 to show accounts as in a picker + */ +void modest_account_view_set_picker_mode (ModestAccountView *self, gboolean enable); + +/** + * modest_account_view_get_picker_mode: + * @self: a #ModestAccountView + * + * Gets if account view is in picker mode. + * + * Returns: %TRUE if @self in picker mode, %FALSE otherwise + */ +gboolean modest_account_view_get_picker_mode (ModestAccountView *self); + +/** + * modest_account_view_set_show_last_update: + * @self: a #ModestAccountView + * @show: a #gboolean + * + * show/hide the last update column + */ +void modest_account_view_set_show_last_update (ModestAccountView *self, gboolean show); + +/** + * modest_account_view_get_show_last_update: + * @self: a #ModestAccountView + * + * tell if it's showing the last update column + * + * Returns: a #gboolean + */ +gboolean modest_account_view_get_show_last_update (ModestAccountView *self); + +/** + * modest_account_view_get_model: + * @self: a #ModestAccountView + * + * obtains the inner tree model + */ +GtkTreeModel *modest_account_view_get_model (ModestAccountView *self); + +/** + * modest_account_view_get_model: + * @self: a #ModestAccountView + * + * obtains the filter of the tree view + */ +GtkTreeModel *modest_account_view_get_filter (ModestAccountView *self); + +#ifdef MODEST_TOOLKIT_HILDON2 +/** + * modest_account_view_setup_live_search: + * @self: a #ModestAccountView + * + * obtains a properly set up #HildonLiveSearch for @self + * + * Returns: a #HildonLiveSearch + */ +GtkWidget *modest_account_view_setup_live_search (ModestAccountView *self); +#endif + G_END_DECLS #endif /* __MODEST_ACCOUNT_VIEW_H__ */