cssnode: Add gtk_css_node_reverse_children()

This commit is contained in:
Benjamin Otte 2015-07-12 23:11:11 +02:00
parent 6e4f42f97e
commit a7680c68de
2 changed files with 17 additions and 0 deletions

View File

@ -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)
{

View File

@ -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);