diff options
author | Benjamin Otte <otte@redhat.com> | 2012-03-18 16:13:09 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2012-04-17 08:59:08 +0200 |
commit | 102d10016f5546126f809659bcc006edfb0f706f (patch) | |
tree | 7f999ff0ae3b31bcf1c28cf5c8f9ea71ef589032 /gtk/gtkcssmatcherprivate.h | |
parent | 5f5bf27287d188ac070ac7e02be2f6f81fb3874f (diff) | |
download | gtk+-102d10016f5546126f809659bcc006edfb0f706f.tar.gz |
matcher: Add a superset matcher
This matcher always matches only on some relvant things and ignores the
rest. This allows you to match only on name and class, but ignore state
and parents/siblings for example.
Diffstat (limited to 'gtk/gtkcssmatcherprivate.h')
-rw-r--r-- | gtk/gtkcssmatcherprivate.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk/gtkcssmatcherprivate.h b/gtk/gtkcssmatcherprivate.h index 1d07218ffc..b562127eaf 100644 --- a/gtk/gtkcssmatcherprivate.h +++ b/gtk/gtkcssmatcherprivate.h @@ -20,10 +20,12 @@ #include <gtk/gtkenums.h> #include <gtk/gtktypes.h> +#include "gtk/gtkcsstypesprivate.h" G_BEGIN_DECLS typedef union _GtkCssMatcher GtkCssMatcher; +typedef struct _GtkCssMatcherSuperset GtkCssMatcherSuperset; typedef struct _GtkCssMatcherWidgetPath GtkCssMatcherWidgetPath; typedef struct _GtkCssMatcherClass GtkCssMatcherClass; @@ -58,15 +60,26 @@ struct _GtkCssMatcherWidgetPath { guint sibling_index; }; +struct _GtkCssMatcherSuperset { + const GtkCssMatcherClass *klass; + const GtkCssMatcher *subset; + GtkCssChange relevant; +}; + union _GtkCssMatcher { const GtkCssMatcherClass *klass; GtkCssMatcherWidgetPath path; + GtkCssMatcherSuperset superset; }; void _gtk_css_matcher_init (GtkCssMatcher *matcher, const GtkWidgetPath *path, GtkStateFlags state); void _gtk_css_matcher_any_init (GtkCssMatcher *matcher); +void _gtk_css_matcher_superset_init (GtkCssMatcher *matcher, + const GtkCssMatcher *subset, + GtkCssChange relevant); + static inline gboolean _gtk_css_matcher_get_parent (GtkCssMatcher *matcher, |