aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-sorter.h
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-01-17 02:24:31 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-01-17 07:52:52 +0800
commit992c8b7d58025cf4d04ed3665210f191c8048339 (patch)
treeed04bd47c142c1a35820b03c6df8e8455d86f15c /widgets/table/e-table-sorter.h
parent2c476af581cc64bb3de8edc726149a7d8e9677b8 (diff)
downloadgsoc2013-evolution-992c8b7d58025cf4d04ed3665210f191c8048339.tar
gsoc2013-evolution-992c8b7d58025cf4d04ed3665210f191c8048339.tar.gz
gsoc2013-evolution-992c8b7d58025cf4d04ed3665210f191c8048339.tar.bz2
gsoc2013-evolution-992c8b7d58025cf4d04ed3665210f191c8048339.tar.lz
gsoc2013-evolution-992c8b7d58025cf4d04ed3665210f191c8048339.tar.xz
gsoc2013-evolution-992c8b7d58025cf4d04ed3665210f191c8048339.tar.zst
gsoc2013-evolution-992c8b7d58025cf4d04ed3665210f191c8048339.zip
libetable cleanups.
Diffstat (limited to 'widgets/table/e-table-sorter.h')
-rw-r--r--widgets/table/e-table-sorter.h73
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_ */