summaryrefslogtreecommitdiff
path: root/gtk/gtkcssstylepropertyprivate.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2012-03-06 14:16:32 +0100
committerAlexander Larsson <alexl@redhat.com>2012-03-08 11:03:57 +0100
commit7603e6e47395b8e1d66522a22255637fa10d3a47 (patch)
tree0f5e58f31234cea8f6b6503e2b85b646dc603b29 /gtk/gtkcssstylepropertyprivate.h
parent0ece7a5de3eae5f4d7e4d1623d191a0a0628e652 (diff)
downloadgtk+-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/gtkcssstylepropertyprivate.h')
-rw-r--r--gtk/gtkcssstylepropertyprivate.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/gtk/gtkcssstylepropertyprivate.h b/gtk/gtkcssstylepropertyprivate.h
index 2d758272f9..a51d455eaa 100644
--- a/gtk/gtkcssstylepropertyprivate.h
+++ b/gtk/gtkcssstylepropertyprivate.h
@@ -41,16 +41,15 @@ typedef gboolean (* GtkCssStylePropertyParseFunc) (GtkCssStyleProperty
typedef void (* GtkCssStylePropertyPrintFunc) (GtkCssStyleProperty *property,
const GValue *value,
GString *string);
-typedef void (* GtkCssStylePropertyComputeFunc)(GtkCssStyleProperty *property,
- GValue *computed,
+typedef GtkCssValue * (* GtkCssStylePropertyComputeFunc)(GtkCssStyleProperty *property,
GtkStyleContext *context,
- const GValue *specified);
+ GtkCssValue *specified);
struct _GtkCssStyleProperty
{
GtkStyleProperty parent;
GType computed_type;
- GValue initial_value;
+ GtkCssValue *initial_value;
guint id;
guint inherit :1;
@@ -75,20 +74,19 @@ GtkCssStyleProperty * _gtk_css_style_property_lookup_by_id (guint
gboolean _gtk_css_style_property_is_inherit (GtkCssStyleProperty *property);
guint _gtk_css_style_property_get_id (GtkCssStyleProperty *property);
-const GValue * _gtk_css_style_property_get_initial_value
+GtkCssValue * _gtk_css_style_property_get_initial_value
(GtkCssStyleProperty *property);
GType _gtk_css_style_property_get_computed_type (GtkCssStyleProperty *property);
GType _gtk_css_style_property_get_specified_type (GtkCssStyleProperty *property);
gboolean _gtk_css_style_property_is_specified_type (GtkCssStyleProperty *property,
GType type);
-void _gtk_css_style_property_compute_value (GtkCssStyleProperty *property,
- GValue *computed,
+GtkCssValue * _gtk_css_style_property_compute_value (GtkCssStyleProperty *property,
GtkStyleContext *context,
- const GValue *specified);
+ GtkCssValue *specified);
void _gtk_css_style_property_print_value (GtkCssStyleProperty *property,
- const GValue *value,
+ GtkCssValue *value,
GString *string);