mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 14:20:21 +00:00
css: Use the tree to print css selectors
This commit is contained in:
parent
6bec577771
commit
3d5e8f98ec
@ -2884,7 +2884,7 @@ gtk_css_ruleset_print (const GtkCssRuleset *ruleset,
|
||||
WidgetPropertyValue *widget_value;
|
||||
guint i;
|
||||
|
||||
_gtk_css_selector_print (ruleset->selector, str);
|
||||
_gtk_css_selector_tree_match_print (ruleset->selector_match, str);
|
||||
|
||||
g_string_append (str, " {\n");
|
||||
|
||||
|
@ -1675,6 +1675,18 @@ _gtk_css_selector_tree_print (GtkCssSelectorTree *tree, GString *str, char *pref
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
_gtk_css_selector_tree_match_print (const GtkCssSelectorTree *tree,
|
||||
GString *str)
|
||||
{
|
||||
g_return_if_fail (tree != NULL);
|
||||
|
||||
tree->selector.class->print (&tree->selector, str);
|
||||
|
||||
if (tree->parent)
|
||||
_gtk_css_selector_tree_match_print (tree->parent, str);
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_css_selector_tree_free (GtkCssSelectorTree *tree)
|
||||
{
|
||||
|
@ -40,10 +40,11 @@ gboolean _gtk_css_selector_matches (const GtkCssSelector *sel
|
||||
int _gtk_css_selector_compare (const GtkCssSelector *a,
|
||||
const GtkCssSelector *b);
|
||||
|
||||
|
||||
void _gtk_css_selector_tree_free (GtkCssSelectorTree *tree);
|
||||
GPtrArray *_gtk_css_selector_tree_match_all (GtkCssSelectorTree *tree,
|
||||
const GtkCssMatcher *matcher);
|
||||
void _gtk_css_selector_tree_free (GtkCssSelectorTree *tree);
|
||||
GPtrArray *_gtk_css_selector_tree_match_all (GtkCssSelectorTree *tree,
|
||||
const GtkCssMatcher *matcher);
|
||||
void _gtk_css_selector_tree_match_print (const GtkCssSelectorTree *tree,
|
||||
GString *str);
|
||||
|
||||
GtkCssSelectorTreeBuilder *_gtk_css_selector_tree_builder_new (void);
|
||||
void _gtk_css_selector_tree_builder_add (GtkCssSelectorTreeBuilder *builder,
|
||||
|
Loading…
Reference in New Issue
Block a user