summaryrefslogtreecommitdiff
path: root/gtk/gtkrbtree.c
diff options
context:
space:
mode:
authorKristian Rietveld <kris@gtk.org>2002-01-27 22:21:27 +0000
committerKristian Rietveld <kristian@src.gnome.org>2002-01-27 22:21:27 +0000
commit2d0eb8a588b9075b7918425abd562cd1ef5c8cca (patch)
tree81ca099ea6a44d9c83eb54b16caa82e0adbc3dae /gtk/gtkrbtree.c
parentad219f2e3a22b0ea8dfd9571917b62e3d6b56d1c (diff)
downloadgdk-pixbuf-2d0eb8a588b9075b7918425abd562cd1ef5c8cca.tar.gz
add _gtk_rbtree_mark_invalid (my previous commit already needed this ...)
Sun Jan 27 23:23:23 Kristian Rietveld <kris@gtk.org> * gtk/gtkrbtree.[ch]: add _gtk_rbtree_mark_invalid (my previous commit already needed this ...) (/me broke the build for the first time ... :)
Diffstat (limited to 'gtk/gtkrbtree.c')
-rw-r--r--gtk/gtkrbtree.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gtk/gtkrbtree.c b/gtk/gtkrbtree.c
index 5739e59a8..0170f2cff 100644
--- a/gtk/gtkrbtree.c
+++ b/gtk/gtkrbtree.c
@@ -853,6 +853,30 @@ _gtk_rbtree_column_invalid (GtkRBTree *tree)
while ((node = _gtk_rbtree_next (tree, node)) != NULL);
}
+void
+_gtk_rbtree_mark_invalid (GtkRBTree *tree)
+{
+ GtkRBNode *node;
+
+ if (tree == NULL)
+ return;
+ node = tree->root;
+ g_assert (node);
+
+ while (node->left != tree->nil)
+ node = node->left;
+
+ do
+ {
+ GTK_RBNODE_SET_FLAG (node, GTK_RBNODE_INVALID);
+ GTK_RBNODE_SET_FLAG (node, GTK_RBNODE_DESCENDANTS_INVALID);
+
+ if (node->children)
+ _gtk_rbtree_mark_invalid (node->children);
+ }
+ while ((node = _gtk_rbtree_next (tree, node)) != NULL);
+}
+
typedef struct _GtkRBReorder
{
GtkRBTree *children;