[gtk+] cssnode: Add gtk_css_node_reverse_children()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] cssnode: Add gtk_css_node_reverse_children()
- Date: Thu, 16 Jul 2015 04:40:14 +0000 (UTC)
commit a7680c68de3cc5012ac7a63658c051f1771e8af9
Author: Benjamin Otte <otte redhat com>
Date: Sun Jul 12 23:11:11 2015 +0200
cssnode: Add gtk_css_node_reverse_children()
gtk/gtkcssnode.c | 15 +++++++++++++++
gtk/gtkcssnodeprivate.h | 2 ++
2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssnode.c b/gtk/gtkcssnode.c
index 8f1e4d9..9d76f2a 100644
--- a/gtk/gtkcssnode.c
+++ b/gtk/gtkcssnode.c
@@ -772,6 +772,21 @@ gtk_css_node_insert_before (GtkCssNode *parent,
next_sibling ? next_sibling->previous_sibling : parent->last_child);
}
+void
+gtk_css_node_reverse_children (GtkCssNode *cssnode)
+{
+ GtkCssNode *end;
+
+ end = cssnode->last_child;
+ while (cssnode->first_child != end)
+ {
+ gtk_css_node_reposition (cssnode->first_child,
+ cssnode,
+ end);
+ }
+
+}
+
GtkCssNode *
gtk_css_node_get_parent (GtkCssNode *cssnode)
{
diff --git a/gtk/gtkcssnodeprivate.h b/gtk/gtkcssnodeprivate.h
index ad606aa..cbed7e8 100644
--- a/gtk/gtkcssnodeprivate.h
+++ b/gtk/gtkcssnodeprivate.h
@@ -101,6 +101,8 @@ void gtk_css_node_insert_after (GtkCssNode *
void gtk_css_node_insert_before (GtkCssNode *parent,
GtkCssNode *cssnode,
GtkCssNode *next_sibling);
+void gtk_css_node_reverse_children (GtkCssNode *cssnode);
+
GtkCssNode * gtk_css_node_get_parent (GtkCssNode *cssnode);
GtkCssNode * gtk_css_node_get_first_child (GtkCssNode *cssnode);
GtkCssNode * gtk_css_node_get_last_child (GtkCssNode *cssnode);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]