diff options
author | Benjamin Otte <otte@redhat.com> | 2015-09-12 02:59:38 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2015-09-12 05:27:35 +0200 |
commit | c6a5a12922e99daff27b751d0ad6a0dfe13b8025 (patch) | |
tree | 79f8250d379491c085d186d41b5d42a47c7443e2 /gtk/gtkcssnodedeclaration.c | |
parent | 610452dda87e4142114448cef99956fcda93ca2b (diff) | |
download | gtk+-c6a5a12922e99daff27b751d0ad6a0dfe13b8025.tar.gz |
widgetpath: Implement using GtkCssNodeDeclaration
This removes a bunch of code but more importantly allows providing the
declaration in CSS matchers.
Diffstat (limited to 'gtk/gtkcssnodedeclaration.c')
-rw-r--r-- | gtk/gtkcssnodedeclaration.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk/gtkcssnodedeclaration.c b/gtk/gtkcssnodedeclaration.c index 8e425a4387..83bbb3d0b6 100644 --- a/gtk/gtkcssnodedeclaration.c +++ b/gtk/gtkcssnodedeclaration.c @@ -450,6 +450,21 @@ gtk_css_node_declaration_remove_region (GtkCssNodeDeclaration **decl, } gboolean +gtk_css_node_declaration_clear_regions (GtkCssNodeDeclaration **decl) +{ + if ((*decl)->n_regions == 0) + return FALSE; + + gtk_css_node_declaration_make_writable_resize (decl, + (char *) get_regions (*decl) - (char *) *decl, + 0, + sizeof (GtkRegion) * (*decl)->n_regions); + (*decl)->n_regions = 0; + + return TRUE; +} + +gboolean gtk_css_node_declaration_has_region (const GtkCssNodeDeclaration *decl, GQuark region_quark, GtkRegionFlags *flags_return) |