From 992c8b7d58025cf4d04ed3665210f191c8048339 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 16 Jan 2011 13:24:31 -0500 Subject: libetable cleanups. --- widgets/table/e-tree-selection-model.h | 80 +++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 30 deletions(-) (limited to 'widgets/table/e-tree-selection-model.h') diff --git a/widgets/table/e-tree-selection-model.h b/widgets/table/e-tree-selection-model.h index e66abf3454..1541fcb95a 100644 --- a/widgets/table/e-tree-selection-model.h +++ b/widgets/table/e-tree-selection-model.h @@ -23,48 +23,68 @@ #ifndef _E_TREE_SELECTION_MODEL_H_ #define _E_TREE_SELECTION_MODEL_H_ -#include #include #include #include -G_BEGIN_DECLS - -typedef void (*ETreeForeachFunc) (ETreePath path, - gpointer closure); +/* Standard GObject macros */ +#define E_TYPE_TREE_SELECTION_MODEL \ + (e_tree_selection_model_get_type ()) +#define E_TREE_SELECTION_MODEL(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST \ + ((obj), E_TYPE_TREE_SELECTION_MODEL, ETreeSelectionModel)) +#define E_TREE_SELECTION_MODEL_CLASS(cls) \ + (G_TYPE_CHECK_CLASS_CAST \ + ((cls), E_TYPE_TREE_SELECTION_MODEL, ETreeSelectionModelClass)) +#define E_IS_TREE_SELECTION_MODEL(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE \ + ((obj), E_TYPE_TREE_SELECTION_MODEL)) +#define E_IS_TREE_SELECTION_MODEL_CLASS(cls) \ + (G_TYPE_CHECK_CLASS_TYPE \ + ((cls), E_TYPE_TREE_SELECTION_MODEL)) +#define E_TREE_SELECTION_MODEL_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS \ + ((obj), E_TYPE_TREE_SELECTION_MODEL, ETreeSelectionModelClass)) -typedef struct ETreeSelectionModelPriv ETreeSelectionModelPriv; +G_BEGIN_DECLS -#define E_TREE_SELECTION_MODEL_TYPE (e_tree_selection_model_get_type ()) -#define E_TREE_SELECTION_MODEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TREE_SELECTION_MODEL_TYPE, ETreeSelectionModel)) -#define E_TREE_SELECTION_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TREE_SELECTION_MODEL_TYPE, ETreeSelectionModelClass)) -#define E_IS_TREE_SELECTION_MODEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TREE_SELECTION_MODEL_TYPE)) -#define E_IS_TREE_SELECTION_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TREE_SELECTION_MODEL_TYPE)) +typedef void (*ETreeForeachFunc) (ETreePath path, + gpointer closure); -typedef struct { - ESelectionModel base; +typedef struct _ETreeSelectionModel ETreeSelectionModel; +typedef struct _ETreeSelectionModelClass ETreeSelectionModelClass; +typedef struct _ETreeSelectionModelPrivate ETreeSelectionModelPrivate; - ETreeSelectionModelPriv *priv; -} ETreeSelectionModel; +struct _ETreeSelectionModel { + ESelectionModel parent; + ETreeSelectionModelPrivate *priv; +}; -typedef struct { +struct _ETreeSelectionModelClass { ESelectionModelClass parent_class; -} ETreeSelectionModelClass; +}; -GType e_tree_selection_model_get_type (void); -ESelectionModel *e_tree_selection_model_new (void); -void e_tree_selection_model_foreach (ETreeSelectionModel *etsm, - ETreeForeachFunc callback, - gpointer closure); -void e_tree_selection_model_select_single_path (ETreeSelectionModel *etsm, - ETreePath path); -void e_tree_selection_model_select_paths (ETreeSelectionModel *etsm, GPtrArray *paths); +GType e_tree_selection_model_get_type (void) G_GNUC_CONST; +ESelectionModel * + e_tree_selection_model_new (void); +void e_tree_selection_model_foreach (ETreeSelectionModel *etsm, + ETreeForeachFunc callback, + gpointer closure); +void e_tree_selection_model_select_single_path + (ETreeSelectionModel *etsm, + ETreePath path); +void e_tree_selection_model_select_paths + (ETreeSelectionModel *etsm, + GPtrArray *paths); -void e_tree_selection_model_add_to_selection (ETreeSelectionModel *etsm, - ETreePath path); -void e_tree_selection_model_change_cursor (ETreeSelectionModel *etsm, - ETreePath path); -ETreePath e_tree_selection_model_get_cursor (ETreeSelectionModel *etsm); +void e_tree_selection_model_add_to_selection + (ETreeSelectionModel *etsm, + ETreePath path); +void e_tree_selection_model_change_cursor + (ETreeSelectionModel *etsm, + ETreePath path); +ETreePath e_tree_selection_model_get_cursor + (ETreeSelectionModel *etsm); G_END_DECLS -- cgit v1.2.3