diff options
author | Alexander Larsson <alexl@redhat.com> | 2012-03-06 14:16:32 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2012-03-08 11:03:57 +0100 |
commit | 7603e6e47395b8e1d66522a22255637fa10d3a47 (patch) | |
tree | 0f5e58f31234cea8f6b6503e2b85b646dc603b29 /gtk/gtkstylepropertyprivate.h | |
parent | 0ece7a5de3eae5f4d7e4d1623d191a0a0628e652 (diff) | |
download | gtk+-7603e6e47395b8e1d66522a22255637fa10d3a47.tar.gz |
css: Use GtkCssValues instead of GValue in the css machinery
Also, in places where we're computing a new CssValue based on an
old one, make sure that if nothing changes we're returning a reference
to the old one, rather than creating a new identical instance.
Diffstat (limited to 'gtk/gtkstylepropertyprivate.h')
-rw-r--r-- | gtk/gtkstylepropertyprivate.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gtk/gtkstylepropertyprivate.h b/gtk/gtkstylepropertyprivate.h index 936b48a317..898b97f776 100644 --- a/gtk/gtkstylepropertyprivate.h +++ b/gtk/gtkstylepropertyprivate.h @@ -20,6 +20,7 @@ #include "gtkcssparserprivate.h" #include "gtkstylecontextprivate.h" +#include "gtkcssvalueprivate.h" G_BEGIN_DECLS @@ -37,8 +38,8 @@ typedef enum { GTK_STYLE_PROPERTY_INHERIT = (1 << 0) } GtkStylePropertyFlags; -typedef const GValue * (* GtkStyleQueryFunc) (guint id, - gpointer data); +typedef GtkCssValue * (* GtkStyleQueryFunc) (guint id, + gpointer data); struct _GtkStyleProperty { @@ -56,8 +57,7 @@ struct _GtkStylePropertyClass GtkStyleProperties *props, GtkStateFlags state, const GValue *value); - void (* query) (GtkStyleProperty *property, - GValue *value, + GtkCssValue * (* query) (GtkStyleProperty *property, GtkStyleQueryFunc query_func, gpointer query_data); gboolean (* parse_value) (GtkStyleProperty * property, @@ -82,8 +82,7 @@ gboolean _gtk_style_property_parse_value (GtkStyleProperty * GFile *base); GType _gtk_style_property_get_value_type(GtkStyleProperty * property); -void _gtk_style_property_query (GtkStyleProperty * property, - GValue *value, +GtkCssValue * _gtk_style_property_query (GtkStyleProperty * property, GtkStyleQueryFunc query_func, gpointer query_data); void _gtk_style_property_assign (GtkStyleProperty *property, |