diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-01-17 02:24:31 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:19 +0800 |
commit | dfc4205ce569594e83772ac8e0c04f5ca8c2a019 (patch) | |
tree | 5c8eac525f7468f36781c74b1730431950cc7df6 /widgets/table/e-table-sorter.h | |
parent | 30a590ae89a3fbba28a2296606dd7141136b5f21 (diff) | |
download | gsoc2013-evolution-dfc4205ce569594e83772ac8e0c04f5ca8c2a019.tar.gz gsoc2013-evolution-dfc4205ce569594e83772ac8e0c04f5ca8c2a019.tar.zst gsoc2013-evolution-dfc4205ce569594e83772ac8e0c04f5ca8c2a019.zip |
libetable cleanups.
Diffstat (limited to 'widgets/table/e-table-sorter.h')
-rw-r--r-- | widgets/table/e-table-sorter.h | 73 |
1 files changed, 45 insertions, 28 deletions
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 <glib-object.h> #include <e-util/e-sorter.h> #include <table/e-table-model.h> #include <table/e-table-subset-variable.h> #include <table/e-table-sort-info.h> #include <table/e-table-header.h> +/* 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_ */ |