22 #ifndef __GTK_RBTREE_H__
23 #define __GTK_RBTREE_H__
106 #define GTK_RBNODE_GET_COLOR(node) (node?(((node->flags>K_RBNODE_RED)==GTK_RBNODE_RED)?GTK_RBNODE_RED:GTK_RBNODE_BLACK):GTK_RBNODE_BLACK)
107 #define GTK_RBNODE_SET_COLOR(node,color) if((node->flags&color)!=color)node->flags=node->flags^(GTK_RBNODE_RED|GTK_RBNODE_BLACK)
108 #define GTK_RBNODE_GET_HEIGHT(node) (node->offset-(node->left->offset+node->right->offset+(node->children?node->children->root->offset:0)))
109 #define GTK_RBNODE_SET_FLAG(node, flag) G_STMT_START{ (node->flags|=flag); }G_STMT_END
110 #define GTK_RBNODE_UNSET_FLAG(node, flag) G_STMT_START{ (node->flags&=~(flag)); }G_STMT_END
111 #define GTK_RBNODE_FLAG_SET(node, flag) (node?(((node->flags&flag)==flag)?TRUE:FALSE):FALSE)
144 gboolean mark_valid);
174 #ifdef G_ENABLE_DEBUG
175 void _gtk_rbtree_test (
const gchar *where,
177 void _gtk_rbtree_debug_spew (
GtkRBTree *tree);
GtkRBNode * _gtk_rbtree_prev(GtkRBTree *tree, GtkRBNode *node)
void _gtk_rbtree_traverse(GtkRBTree *tree, GtkRBNode *node, GTraverseType order, GtkRBTreeTraverseFunc func, gpointer data)
void _gtk_rbtree_column_invalid(GtkRBTree *tree)
GtkRBNode * _gtk_rbtree_insert_after(GtkRBTree *tree, GtkRBNode *node, gint height, gboolean valid)
gint _gtk_rbtree_node_find_parity(GtkRBTree *tree, GtkRBNode *node)
void _gtk_rbtree_mark_invalid(GtkRBTree *tree)
void _gtk_rbtree_node_mark_valid(GtkRBTree *tree, GtkRBNode *node)
void _gtk_rbtree_prev_full(GtkRBTree *tree, GtkRBNode *node, GtkRBTree **new_tree, GtkRBNode **new_node)
void _gtk_rbtree_free(GtkRBTree *tree)
void _gtk_rbtree_set_fixed_height(GtkRBTree *tree, gint height, gboolean mark_valid)
gint _gtk_rbtree_node_find_offset(GtkRBTree *tree, GtkRBNode *node)
gint _gtk_rbtree_find_offset(GtkRBTree *tree, gint offset, GtkRBTree **new_tree, GtkRBNode **new_node)
GtkRBTree * _gtk_rbtree_new(void)
struct _GtkRBTreeView GtkRBTreeView
void _gtk_rbtree_reorder(GtkRBTree *tree, gint *new_order, gint length)
void _gtk_rbtree_remove(GtkRBTree *tree)
GtkRBNode * _gtk_rbtree_insert_before(GtkRBTree *tree, GtkRBNode *node, gint height, gboolean valid)
gint _gtk_rbtree_get_depth(GtkRBTree *tree)
void _gtk_rbtree_next_full(GtkRBTree *tree, GtkRBNode *node, GtkRBTree **new_tree, GtkRBNode **new_node)
void _gtk_rbtree_destroy(GtkRBTree *tree)
void _gtk_rbtree_remove_node(GtkRBTree *tree, GtkRBNode *node)
void(* GtkRBTreeTraverseFunc)(GtkRBTree *tree, GtkRBNode *node, gpointer data)
GtkRBNode * _gtk_rbtree_find_count(GtkRBTree *tree, gint count)
@ GTK_RBNODE_IS_SEMI_EXPANDED
@ GTK_RBNODE_DESCENDANTS_INVALID
@ GTK_RBNODE_COLUMN_INVALID
@ GTK_RBNODE_IS_SEMI_COLLAPSED
void _gtk_rbtree_node_mark_invalid(GtkRBTree *tree, GtkRBNode *node)
void _gtk_rbtree_node_set_height(GtkRBTree *tree, GtkRBNode *node, gint height)
GtkRBNode * _gtk_rbtree_next(GtkRBTree *tree, GtkRBNode *node)
PBD::PropertyDescriptor< uint32_t > order
PBD::PropertyDescriptor< timecnt_t > length