diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-01-17 02:24:31 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-01-17 07:52:52 +0800 |
commit | 992c8b7d58025cf4d04ed3665210f191c8048339 (patch) | |
tree | ed04bd47c142c1a35820b03c6df8e8455d86f15c /widgets/table/e-tree-table-adapter.h | |
parent | 2c476af581cc64bb3de8edc726149a7d8e9677b8 (diff) | |
download | gsoc2013-evolution-992c8b7d58025cf4d04ed3665210f191c8048339.tar.gz gsoc2013-evolution-992c8b7d58025cf4d04ed3665210f191c8048339.tar.zst gsoc2013-evolution-992c8b7d58025cf4d04ed3665210f191c8048339.zip |
libetable cleanups.
Diffstat (limited to 'widgets/table/e-tree-table-adapter.h')
-rw-r--r-- | widgets/table/e-tree-table-adapter.h | 152 |
1 files changed, 90 insertions, 62 deletions
diff --git a/widgets/table/e-tree-table-adapter.h b/widgets/table/e-tree-table-adapter.h index b5fc2c0422..ea7b86b21d 100644 --- a/widgets/table/e-tree-table-adapter.h +++ b/widgets/table/e-tree-table-adapter.h @@ -24,81 +24,109 @@ #ifndef _E_TREE_TABLE_ADAPTER_H_ #define _E_TREE_TABLE_ADAPTER_H_ -#include <glib-object.h> #include <table/e-table-model.h> #include <table/e-tree-model.h> #include <table/e-table-sort-info.h> #include <table/e-table-header.h> #include <libxml/tree.h> -G_BEGIN_DECLS - -#define E_TREE_TABLE_ADAPTER_TYPE (e_tree_table_adapter_get_type ()) -#define E_TREE_TABLE_ADAPTER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TREE_TABLE_ADAPTER_TYPE, ETreeTableAdapter)) -#define E_TREE_TABLE_ADAPTER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TREE_TABLE_ADAPTER_TYPE, ETreeTableAdapterClass)) -#define E_IS_TREE_TABLE_ADAPTER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TREE_TABLE_ADAPTER_TYPE)) -#define E_IS_TREE_TABLE_ADAPTER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TREE_TABLE_ADAPTER_TYPE)) -#define E_TREE_TABLE_ADAPTER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((obj), E_TREE_TABLE_ADAPTER_TYPE, ETreeTableAdapterClass)) +/* Standard GObject macros */ +#define E_TYPE_TREE_TABLE_ADAPTER \ + (e_tree_table_adapter_get_type ()) +#define E_TREE_TABLE_ADAPTER(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST \ + ((obj), E_TYPE_TREE_TABLE_ADAPTER, ETreeTableAdapter)) +#define E_TREE_TABLE_ADAPTER_CLASS(cls) \ + (G_TYPE_CHECK_CLASS_CAST \ + ((cls), E_TYPE_TREE_TABLE_ADAPTER, ETreeTableAdapterClass)) +#define E_IS_TREE_TABLE_ADAPTER(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE \ + ((obj), E_TYPE_TREE_TABLE_ADAPTER)) +#define E_IS_TREE_TABLE_ADAPTER_CLASS(cls) \ + (G_TYPE_CHECK_CLASS_TYPE \ + ((cls), E_TYPE_TREE_TABLE_ADAPTER)) +#define E_TREE_TABLE_ADAPTER_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS \ + ((obj), E_TYPE_TREE_TABLE_ADAPTER, ETreeTableAdapterClass)) -typedef struct ETreeTableAdapterPriv ETreeTableAdapterPriv; +G_BEGIN_DECLS -typedef struct { - ETableModel base; +typedef struct _ETreeTableAdapter ETreeTableAdapter; +typedef struct _ETreeTableAdapterClass ETreeTableAdapterClass; +typedef struct _ETreeTableAdapterPrivate ETreeTableAdapterPrivate; - ETreeTableAdapterPriv *priv; -} ETreeTableAdapter; +struct _ETreeTableAdapter { + ETableModel parent; + ETreeTableAdapterPrivate *priv; +}; -typedef struct { +struct _ETreeTableAdapterClass { ETableModelClass parent_class; /* Signals */ - gboolean (*sorting_changed) (ETreeTableAdapter *etta); -} ETreeTableAdapterClass; - -GType e_tree_table_adapter_get_type (void); -ETableModel *e_tree_table_adapter_new (ETreeModel *source, - ETableSortInfo *sort_info, - ETableHeader *header); -ETableModel *e_tree_table_adapter_construct (ETreeTableAdapter *ets, - ETreeModel *source, - ETableSortInfo *sort_info, - ETableHeader *header); - -ETreePath e_tree_table_adapter_node_get_next (ETreeTableAdapter *etta, - ETreePath path); -gboolean e_tree_table_adapter_node_is_expanded (ETreeTableAdapter *etta, - ETreePath path); -void e_tree_table_adapter_node_set_expanded (ETreeTableAdapter *etta, - ETreePath path, - gboolean expanded); -void e_tree_table_adapter_node_set_expanded_recurse (ETreeTableAdapter *etta, - ETreePath path, - gboolean expanded); -void e_tree_table_adapter_force_expanded_state (ETreeTableAdapter *etta, - gint state); -void e_tree_table_adapter_root_node_set_visible (ETreeTableAdapter *etta, - gboolean visible); -ETreePath e_tree_table_adapter_node_at_row (ETreeTableAdapter *etta, - gint row); -gint e_tree_table_adapter_row_of_node (ETreeTableAdapter *etta, - ETreePath path); -gboolean e_tree_table_adapter_root_node_is_visible (ETreeTableAdapter *etta); - -void e_tree_table_adapter_show_node (ETreeTableAdapter *etta, - ETreePath path); - -void e_tree_table_adapter_save_expanded_state (ETreeTableAdapter *etta, - const gchar *filename); -void e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, - const gchar *filename); - -xmlDoc *e_tree_table_adapter_save_expanded_state_xml (ETreeTableAdapter *etta); -void e_tree_table_adapter_load_expanded_state_xml (ETreeTableAdapter *etta, xmlDoc *doc); - -void e_tree_table_adapter_set_sort_info (ETreeTableAdapter *etta, - ETableSortInfo *sort_info); -ETableSortInfo *e_tree_table_adapter_get_sort_info (ETreeTableAdapter *etta); -ETableHeader *e_tree_table_adapter_get_header (ETreeTableAdapter *etta); + gboolean (*sorting_changed) (ETreeTableAdapter *etta); +}; + +GType e_tree_table_adapter_get_type (void) G_GNUC_CONST; +ETableModel * e_tree_table_adapter_new (ETreeModel *source, + ETableSortInfo *sort_info, + ETableHeader *header); +ETableModel * e_tree_table_adapter_construct (ETreeTableAdapter *ets, + ETreeModel *source, + ETableSortInfo *sort_info, + ETableHeader *header); + +ETreePath e_tree_table_adapter_node_get_next + (ETreeTableAdapter *etta, + ETreePath path); +gboolean e_tree_table_adapter_node_is_expanded + (ETreeTableAdapter *etta, + ETreePath path); +void e_tree_table_adapter_node_set_expanded + (ETreeTableAdapter *etta, + ETreePath path, + gboolean expanded); +void e_tree_table_adapter_node_set_expanded_recurse + (ETreeTableAdapter *etta, + ETreePath path, + gboolean expanded); +void e_tree_table_adapter_force_expanded_state + (ETreeTableAdapter *etta, + gint state); +void e_tree_table_adapter_root_node_set_visible + (ETreeTableAdapter *etta, + gboolean visible); +ETreePath e_tree_table_adapter_node_at_row + (ETreeTableAdapter *etta, + gint row); +gint e_tree_table_adapter_row_of_node + (ETreeTableAdapter *etta, + ETreePath path); +gboolean e_tree_table_adapter_root_node_is_visible + (ETreeTableAdapter *etta); + +void e_tree_table_adapter_show_node (ETreeTableAdapter *etta, + ETreePath path); + +void e_tree_table_adapter_save_expanded_state + (ETreeTableAdapter *etta, + const gchar *filename); +void e_tree_table_adapter_load_expanded_state + (ETreeTableAdapter *etta, + const gchar *filename); + +xmlDoc * e_tree_table_adapter_save_expanded_state_xml + (ETreeTableAdapter *etta); +void e_tree_table_adapter_load_expanded_state_xml + (ETreeTableAdapter *etta, + xmlDoc *doc); + +void e_tree_table_adapter_set_sort_info + (ETreeTableAdapter *etta, + ETableSortInfo *sort_info); +ETableSortInfo *e_tree_table_adapter_get_sort_info + (ETreeTableAdapter *etta); +ETableHeader * e_tree_table_adapter_get_header (ETreeTableAdapter *etta); G_END_DECLS |