--- a/gnttree.c Mon May 13 23:24:41 2019 -0400
+++ b/gnttree.c Mon May 13 23:37:58 2019 -0400
@@ -40,6 +40,22 @@
#define RIGHT_ALIGNED(priv, index) \
(priv->columns[index].flags & GNT_TREE_COLUMN_RIGHT_ALIGNED)
+ GNT_TREE_COLUMN_INVISIBLE = 1 << 0, + GNT_TREE_COLUMN_FIXED_SIZE = 1 << 1, + GNT_TREE_COLUMN_BINARY_DATA = 1 << 2, + GNT_TREE_COLUMN_RIGHT_ALIGNED = 1 << 3, +typedef struct _GntTreeColInfo + GntTreeColumnFlag flags; @@ -67,10 +83,6 @@
GList *list; /* List of GntTreeRow s */
GHashTable *hash; /* We need this for quickly referencing the rows */
- GntTreeHashFunc hash_func;
- GntTreeHashEqualityFunc hash_eq_func;
- GDestroyNotify key_destroy;
- GDestroyNotify value_destroy;
int ncol; /* No. of columns */
GntTreeColInfo *columns; /* Would a GList be better? */
@@ -114,12 +126,12 @@
+typedef struct _GntTreeCol int span; /* How many columns does it span? */
static void tree_selection_changed(GntTree *, GntTreeRow *, GntTreeRow *);
static void _gnt_tree_init_internals(GntTree *tree, int col);
@@ -2100,7 +2112,9 @@
gnt_widget_set_size(GNT_WIDGET(tree), twidth, -1);
-void gnt_tree_set_hash_fns(GntTree *tree, gpointer hash, gpointer eq, gpointer kd)
+gnt_tree_set_hash_fns(GntTree *tree, GntTreeHashFunc hash, + GntTreeHashEqualityFunc eq, GDestroyNotify kd) GntTreePrivate *priv = NULL;
--- a/gnttree.h Mon May 13 23:24:41 2019 -0400
+++ b/gnttree.h Mon May 13 23:37:58 2019 -0400
@@ -43,24 +43,6 @@
typedef gboolean (*GntTreeHashEqualityFunc)(gconstpointer a, gconstpointer b);
typedef struct _GntTreeRow GntTreeRow;
-typedef struct _GntTreeCol GntTreeCol;
-typedef struct _GntTreeColInfo GntTreeColInfo;
- GNT_TREE_COLUMN_INVISIBLE = 1 << 0,
- GNT_TREE_COLUMN_FIXED_SIZE = 1 << 1,
- GNT_TREE_COLUMN_BINARY_DATA = 1 << 2,
- GNT_TREE_COLUMN_RIGHT_ALIGNED = 1 << 3,
- GntTreeColumnFlag flags;
@@ -554,7 +536,8 @@
* Set the hash functions to use to hash, compare and free the keys.
-void gnt_tree_set_hash_fns(GntTree *tree, gpointer hash, gpointer eq, gpointer kd);
+void gnt_tree_set_hash_fns(GntTree *tree, GntTreeHashFunc hash, + GntTreeHashEqualityFunc eq, GDestroyNotify kd); * gnt_tree_set_column_visible: