From 53317aed55da7c48f27d1a0ed8be1cc04cb2f8f2 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 17 Mar 2012 14:32:52 +0100 Subject: matcher: Turn GtkCssMatcher into a union That way, we can add more matchers as we need them. --- gtk/gtkcssmatcherprivate.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gtk/gtkcssmatcherprivate.h') 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); -- cgit v1.2.1