aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-header.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-header.h
parent2c476af581cc64bb3de8edc726149a7d8e9677b8 (diff)
downloadgsoc2013-evolution-992c8b7d58025cf4d04ed3665210f191c8048339.tar.gz
gsoc2013-evolution-992c8b7d58025cf4d04ed3665210f191c8048339.tar.zst
gsoc2013-evolution-992c8b7d58025cf4d04ed3665210f191c8048339.zip
libetable cleanups.
Diffstat (limited to 'widgets/table/e-table-header.h')
-rw-r--r--widgets/table/e-table-header.h135
1 files changed, 77 insertions, 58 deletions
diff --git a/widgets/table/e-table-header.h b/widgets/table/e-table-header.h
index d724c2710f..1ac3016c8f 100644
--- a/widgets/table/e-table-header.h
+++ b/widgets/table/e-table-header.h
@@ -25,29 +25,41 @@
#ifndef _E_TABLE_COLUMN_H_
#define _E_TABLE_COLUMN_H_
-#include <glib-object.h>
#include <gdk/gdk.h>
#include <table/e-table-sort-info.h>
#include <table/e-table-col.h>
+/* Standard GObject macros */
+#define E_TYPE_TABLE_HEADER \
+ (e_table_header_get_type ())
+#define E_TABLE_HEADER(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_TABLE_HEADER, ETableHeader))
+#define E_TABLE_HEADER_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_TABLE_HEADER, ETableHeaderClass))
+#define E_IS_TABLE_HEADER(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_TABLE_HEADER))
+#define E_IS_TABLE_HEADER_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_TABLE_HEADER))
+#define E_TABLE_HEADER_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_TABLE_HEADER, ETableHeaderClass))
+
G_BEGIN_DECLS
typedef struct _ETableHeader ETableHeader;
-
-#define E_TABLE_HEADER_TYPE (e_table_header_get_type ())
-#define E_TABLE_HEADER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TABLE_HEADER_TYPE, ETableHeader))
-#define E_TABLE_HEADER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TABLE_HEADER_TYPE, ETableHeaderClass))
-#define E_IS_TABLE_HEADER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TABLE_HEADER_TYPE))
-#define E_IS_TABLE_HEADER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TABLE_HEADER_TYPE))
-#define E_TABLE_HEADER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), E_TABLE_HEADER_TYPE, ETableHeaderClass))
+typedef struct _ETableHeaderClass ETableHeaderClass;
typedef gboolean (*ETableColCheckFunc) (ETableCol *col, gpointer user_data);
/*
- * A Columnar header.
+ * A Column header.
*/
struct _ETableHeader {
- GObject base;
+ GObject parent;
gint col_count;
gint width;
@@ -63,56 +75,63 @@ struct _ETableHeader {
gint idle;
};
-typedef struct {
+struct _ETableHeaderClass {
GObjectClass parent_class;
- void (*structure_change) (ETableHeader *eth);
- void (*dimension_change) (ETableHeader *eth, gint width);
- void (*expansion_change) (ETableHeader *eth);
- gint (*request_width) (ETableHeader *eth, gint col);
-} ETableHeaderClass;
-
-GType e_table_header_get_type (void);
-ETableHeader *e_table_header_new (void);
-
-void e_table_header_add_column (ETableHeader *eth,
- ETableCol *tc,
- gint pos);
-ETableCol *e_table_header_get_column (ETableHeader *eth,
- gint column);
-ETableCol *e_table_header_get_column_by_col_idx (ETableHeader *eth,
- gint col_idx);
-gint e_table_header_count (ETableHeader *eth);
-gint e_table_header_index (ETableHeader *eth,
- gint col);
-gint e_table_header_get_index_at (ETableHeader *eth,
- gint x_offset);
-ETableCol **e_table_header_get_columns (ETableHeader *eth);
-gint e_table_header_get_selected (ETableHeader *eth);
-
-gint e_table_header_total_width (ETableHeader *eth);
-gint e_table_header_min_width (ETableHeader *eth);
-void e_table_header_move (ETableHeader *eth,
- gint source_index,
- gint target_index);
-void e_table_header_remove (ETableHeader *eth,
- gint idx);
-void e_table_header_set_size (ETableHeader *eth,
- gint idx,
- gint size);
-void e_table_header_set_selection (ETableHeader *eth,
- gboolean allow_selection);
-gint e_table_header_col_diff (ETableHeader *eth,
- gint start_col,
- gint end_col);
-
-void e_table_header_calc_widths (ETableHeader *eth);
-GList *e_table_header_get_selected_indexes (ETableHeader *eth);
-void e_table_header_update_horizontal (ETableHeader *eth);
-gint e_table_header_prioritized_column (ETableHeader *eth);
-ETableCol *e_table_header_prioritized_column_selected (ETableHeader *eth,
- ETableColCheckFunc check_func,
- gpointer user_data);
+ void (*structure_change) (ETableHeader *eth);
+ void (*dimension_change) (ETableHeader *eth,
+ gint width);
+ void (*expansion_change) (ETableHeader *eth);
+ gint (*request_width) (ETableHeader *eth,
+ gint col);
+};
+
+GType e_table_header_get_type (void) G_GNUC_CONST;
+ETableHeader * e_table_header_new (void);
+
+void e_table_header_add_column (ETableHeader *eth,
+ ETableCol *tc,
+ gint pos);
+ETableCol * e_table_header_get_column (ETableHeader *eth,
+ gint column);
+ETableCol * e_table_header_get_column_by_col_idx
+ (ETableHeader *eth,
+ gint col_idx);
+gint e_table_header_count (ETableHeader *eth);
+gint e_table_header_index (ETableHeader *eth,
+ gint col);
+gint e_table_header_get_index_at (ETableHeader *eth,
+ gint x_offset);
+ETableCol ** e_table_header_get_columns (ETableHeader *eth);
+gint e_table_header_get_selected (ETableHeader *eth);
+
+gint e_table_header_total_width (ETableHeader *eth);
+gint e_table_header_min_width (ETableHeader *eth);
+void e_table_header_move (ETableHeader *eth,
+ gint source_index,
+ gint target_index);
+void e_table_header_remove (ETableHeader *eth,
+ gint idx);
+void e_table_header_set_size (ETableHeader *eth,
+ gint idx,
+ gint size);
+void e_table_header_set_selection (ETableHeader *eth,
+ gboolean allow_selection);
+gint e_table_header_col_diff (ETableHeader *eth,
+ gint start_col,
+ gint end_col);
+
+void e_table_header_calc_widths (ETableHeader *eth);
+GList * e_table_header_get_selected_indexes
+ (ETableHeader *eth);
+void e_table_header_update_horizontal
+ (ETableHeader *eth);
+gint e_table_header_prioritized_column
+ (ETableHeader *eth);
+ETableCol * e_table_header_prioritized_column_selected
+ (ETableHeader *eth,
+ ETableColCheckFunc check_func,
+ gpointer user_data);
G_END_DECLS