summaryrefslogtreecommitdiff
path: root/gtk/gtkstyleproperty.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-03-26 17:24:02 +0200
committerBenjamin Otte <otte@redhat.com>2012-04-17 08:59:11 +0200
commit9b7640b898c61eb4ff49140880f2bb2b70eb9f0b (patch)
tree8549d2c0d73a7a70859210283ade4802e4d2f41e /gtk/gtkstyleproperty.c
parent718ceaec450947b77a52318647a972591d183b5c (diff)
downloadgtk+-9b7640b898c61eb4ff49140880f2bb2b70eb9f0b.tar.gz
styleproperty: Make _gtk_style_property_parse_value() return a CssValue
Also split out initial/inherit handling into a custom GtkCssValue class.
Diffstat (limited to 'gtk/gtkstyleproperty.c')
-rw-r--r--gtk/gtkstyleproperty.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/gtk/gtkstyleproperty.c b/gtk/gtkstyleproperty.c
index 7418b93c1a..87234e043a 100644
--- a/gtk/gtkstyleproperty.c
+++ b/gtk/gtkstyleproperty.c
@@ -131,7 +131,6 @@ _gtk_style_property_init (GtkStyleProperty *property)
/**
* _gtk_style_property_parse_value:
* @property: the property
- * @value: an uninitialized value
* @parser: the parser to parse from
* @base: the base file for @aprser
*
@@ -142,26 +141,24 @@ _gtk_style_property_init (GtkStyleProperty *property)
* left uninitialized.
*
* Only if @property is a #GtkCssShorthandProperty, the @value will
- * always contain a #GValueArray with the values to be used for
- * the subproperties.
+ * always be a #GtkCssValue whose values can be queried with
+ * _gtk_css_array_value_get_nth().
*
- * Returns: %TRUE on success
+ * Returns: %NULL on failure or the parsed #GtkCssValue
**/
-gboolean
+GtkCssValue *
_gtk_style_property_parse_value (GtkStyleProperty *property,
- GValue *value,
GtkCssParser *parser,
GFile *base)
{
GtkStylePropertyClass *klass;
- g_return_val_if_fail (GTK_IS_STYLE_PROPERTY (property), FALSE);
- g_return_val_if_fail (value != NULL, FALSE);
- g_return_val_if_fail (parser != NULL, FALSE);
+ g_return_val_if_fail (GTK_IS_STYLE_PROPERTY (property), NULL);
+ g_return_val_if_fail (parser != NULL, NULL);
klass = GTK_STYLE_PROPERTY_GET_CLASS (property);
- return klass->parse_value (property, value, parser, base);
+ return klass->parse_value (property, parser, base);
}
/**