finch/libgnt/gnttree.c

changeset 35594
f1831b0421b2
parent 35475
ec0d44434ba8
child 35596
5b4df5b31fb2
--- a/finch/libgnt/gnttree.c	Wed Feb 19 23:16:15 2014 -0800
+++ b/finch/libgnt/gnttree.c	Thu Feb 20 17:54:28 2014 +0530
@@ -1955,3 +1955,32 @@
 	return row->parent;
 }
 
+/**************************************************************************
+ * GntTreeRow GBoxed API
+ **************************************************************************/
+static GntTreeRow *
+copy_tree_row(GntTreeRow *row)
+{
+	GntTreeRow *row_new;
+
+	g_return_val_if_fail(row != NULL, NULL);
+
+	row_new = g_new(GntTreeRow, 1);
+	*row_new = *row;
+
+	return row_new;
+}
+
+GType
+gnt_tree_row_get_type(void)
+{
+	static GType type = 0;
+
+	if (type == 0) {
+		type = g_boxed_type_register_static("GntTreeRow",
+				(GBoxedCopyFunc)copy_tree_row,
+				(GBoxedFreeFunc)free_tree_row);
+	}
+
+	return type;
+}

mercurial