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-table-config.h | 67 ++++++++++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 25 deletions(-) (limited to 'widgets/table/e-table-config.h') diff --git a/widgets/table/e-table-config.h b/widgets/table/e-table-config.h index 4f690c97cc..083160772f 100644 --- a/widgets/table/e-table-config.h +++ b/widgets/table/e-table-config.h @@ -31,16 +31,33 @@ #include #include +/* Standard GObject macros */ +#define E_TYPE_TABLE_CONFIG \ + (e_table_config_get_type ()) +#define E_TABLE_CONFIG(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST \ + ((obj), E_TYPE_TABLE_CONFIG, ETableConfig)) +#define E_TABLE_CONFIG_CLASS(cls) \ + (G_TYPE_CHECK_CLASS_CAST \ + ((cls), E_TYPE_TABLE_CONFIG, ETableConfigClass)) +#define E_IS_TABLE_CONFIG(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE \ + ((obj), E_TYPE_TABLE_CONFIG)) +#define E_IS_TABLE_CONFIG_CLASS(cls) \ + (G_TYPE_CHECK_CLASS_TYPE \ + ((cls), E_TYPE_TABLE_CONFIG)) +#define E_TABLE_CONFIG_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS \ + ((obj), E_TYPE_TABLE_CONFIG, ETableConfigClass)) + G_BEGIN_DECLS -#define E_TABLE_CONFIG_TYPE (e_table_config_get_type ()) -#define E_TABLE_CONFIG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TABLE_CONFIG_TYPE, ETableConfig)) -#define E_TABLE_CONFIG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TABLE_CONFIG_TYPE, ETableConfigClass)) -#define E_IS_TABLE_CONFIG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TABLE_CONFIG_TYPE)) -#define E_IS_TABLE_CONFIG_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TABLE_CONFIG_TYPE)) -#define E_TABLE_CONFIG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), E_TABLE_CONFIG_TYPE, ETableConfigClass)) +typedef struct _ETableConfigSortWidgets ETableConfigSortWidgets; + +typedef struct _ETableConfig ETableConfig; +typedef struct _ETableConfigClass ETableConfigClass; -typedef struct { +struct _ETableConfigSortWidgets { GtkWidget *combo; GtkWidget *frames; GtkWidget *radio_ascending; @@ -48,9 +65,9 @@ typedef struct { GtkWidget *view_check; /* Only for group dialog */ guint changed_id, toggled_id; gpointer e_table_config; -} ETableConfigSortWidgets; +}; -typedef struct { +struct _ETableConfig { GObject parent; gchar *header; @@ -86,26 +103,26 @@ typedef struct { * List of valid column names */ GSList *column_names; -} ETableConfig; +}; -typedef struct { +struct _ETableConfigClass { GObjectClass parent_class; /* Signals */ - void (*changed) (ETableConfig *config); -} ETableConfigClass; - -GType e_table_config_get_type (void); -ETableConfig *e_table_config_new (const gchar *header, - ETableSpecification *spec, - ETableState *state, - GtkWindow *parent_window); -ETableConfig *e_table_config_construct (ETableConfig *etco, - const gchar *header, - ETableSpecification *spec, - ETableState *state, - GtkWindow *parent_window); -void e_table_config_raise (ETableConfig *config); + void (*changed) (ETableConfig *config); +}; + +GType e_table_config_get_type (void) G_GNUC_CONST; +ETableConfig * e_table_config_new (const gchar *header, + ETableSpecification *spec, + ETableState *state, + GtkWindow *parent_window); +ETableConfig *e_table_config_construct (ETableConfig *etco, + const gchar *header, + ETableSpecification *spec, + ETableState *state, + GtkWindow *parent_window); +void e_table_config_raise (ETableConfig *config); G_END_DECLS -- cgit v1.2.3