summaryrefslogtreecommitdiff
path: root/gtk/gtkcssmatcherprivate.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-03-17 14:32:52 +0100
committerBenjamin Otte <otte@redhat.com>2012-04-17 08:59:07 +0200
commit53317aed55da7c48f27d1a0ed8be1cc04cb2f8f2 (patch)
tree115273940837cd09a90bf0e20ef76abf94d8b2ad /gtk/gtkcssmatcherprivate.h
parentb368c5f10aecc3c6fb9f0a09e9eaace3fd1c95dc (diff)
downloadgtk+-53317aed55da7c48f27d1a0ed8be1cc04cb2f8f2.tar.gz
matcher: Turn GtkCssMatcher into a union
That way, we can add more matchers as we need them.
Diffstat (limited to 'gtk/gtkcssmatcherprivate.h')
-rw-r--r--gtk/gtkcssmatcherprivate.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/gtk/gtkcssmatcherprivate.h b/gtk/gtkcssmatcherprivate.h
index 83eff0e5b3..50412f4faa 100644
--- a/gtk/gtkcssmatcherprivate.h
+++ b/gtk/gtkcssmatcherprivate.h
@@ -23,7 +23,8 @@
G_BEGIN_DECLS
-typedef struct _GtkCssMatcher GtkCssMatcher;
+typedef union _GtkCssMatcher GtkCssMatcher;
+typedef struct _GtkCssMatcherWidgetPath GtkCssMatcherWidgetPath;
typedef struct _GtkCssMatcherClass GtkCssMatcherClass;
struct _GtkCssMatcherClass {
@@ -47,7 +48,7 @@ struct _GtkCssMatcherClass {
guint (* get_n_siblings) (const GtkCssMatcher *matcher);
};
-struct _GtkCssMatcher {
+struct _GtkCssMatcherWidgetPath {
const GtkCssMatcherClass *klass;
const GtkWidgetPath *path;
GtkStateFlags state_flags;
@@ -55,6 +56,11 @@ struct _GtkCssMatcher {
guint sibling_index;
};
+union _GtkCssMatcher {
+ const GtkCssMatcherClass *klass;
+ GtkCssMatcherWidgetPath path;
+};
+
void _gtk_css_matcher_init (GtkCssMatcher *matcher,
const GtkWidgetPath *path,
GtkStateFlags state);