From dfc4205ce569594e83772ac8e0c04f5ca8c2a019 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-table-sorter.h | 73 ++++++++++++++++++++++++++---------------- 1 file changed, 45 insertions(+), 28 deletions(-) (limited to 'widgets/table/e-table-sorter.h') diff --git a/widgets/table/e-table-sorter.h b/widgets/table/e-table-sorter.h index 067da103f9..0f36f441f6 100644 --- a/widgets/table/e-table-sorter.h +++ b/widgets/table/e-table-sorter.h @@ -23,51 +23,68 @@ #ifndef _E_TABLE_SORTER_H_ #define _E_TABLE_SORTER_H_ -#include #include #include #include
#include
#include
+/* Standard GObject macros */ +#define E_TYPE_TABLE_SORTER \ + (e_table_sorter_get_type ()) +#define E_TABLE_SORTER(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST \ + ((obj), E_TYPE_TABLE_SORTER, ETableSorter)) +#define E_TABLE_SORTER_CLASS(cls) \ + (G_TYPE_CHECK_CLASS_CAST \ + ((cls), E_TYPE_TABLE_SORTER, ETableSorterClass)) +#define E_IS_TABLE_SORTER(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE \ + ((obj), E_TYPE_TABLE_SORTER)) +#define E_IS_TABLE_SORTER_CLASS(cls) \ + (G_TYPE_CHECK_CLASS_TYPE \ + ((cls), E_TYPE_TABLE_SORTER)) +#define E_TABLE_SORTER_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS \ + ((obj), E_TYPE_TABLE_SORTER, ETableSorterClass)) + G_BEGIN_DECLS -#define E_TABLE_SORTER_TYPE (e_table_sorter_get_type ()) -#define E_TABLE_SORTER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TABLE_SORTER_TYPE, ETableSorter)) -#define E_TABLE_SORTER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TABLE_SORTER_TYPE, ETableSorterClass)) -#define E_IS_TABLE_SORTER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TABLE_SORTER_TYPE)) -#define E_IS_TABLE_SORTER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TABLE_SORTER_TYPE)) +typedef struct _ETableSorter ETableSorter; +typedef struct _ETableSorterClass ETableSorterClass; -typedef struct { - ESorter base; +struct _ETableSorter { + ESorter parent; - ETableModel *source; - ETableHeader *full_header; + ETableModel *source; + ETableHeader *full_header; ETableSortInfo *sort_info; - /* If needs_sorting is 0, then model_to_sorted and sorted_to_model are no-ops. */ - gint needs_sorting; + /* If needs_sorting is 0, then model_to_sorted + * and sorted_to_model are no-ops. */ + gint needs_sorting; - gint *sorted; - gint *backsorted; + gint *sorted; + gint *backsorted; - gint table_model_changed_id; - gint table_model_row_changed_id; - gint table_model_cell_changed_id; - gint table_model_rows_inserted_id; - gint table_model_rows_deleted_id; - gint sort_info_changed_id; - gint group_info_changed_id; -} ETableSorter; + gint table_model_changed_id; + gint table_model_row_changed_id; + gint table_model_cell_changed_id; + gint table_model_rows_inserted_id; + gint table_model_rows_deleted_id; + gint sort_info_changed_id; + gint group_info_changed_id; +}; -typedef struct { +struct _ETableSorterClass { ESorterClass parent_class; -} ETableSorterClass; +}; + +GType e_table_sorter_get_type (void) G_GNUC_CONST; +ETableSorter * e_table_sorter_new (ETableModel *etm, + ETableHeader *full_header, + ETableSortInfo *sort_info); -GType e_table_sorter_get_type (void); -ETableSorter *e_table_sorter_new (ETableModel *etm, - ETableHeader *full_header, - ETableSortInfo *sort_info); G_END_DECLS #endif /* _E_TABLE_SORTER_H_ */ -- cgit v1.2.3