diff options
author | Benjamin Otte <otte@redhat.com> | 2012-03-27 17:25:41 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2012-04-17 08:59:13 +0200 |
commit | c8e57d63ecbf099f54949cc5e3151d04c1115d75 (patch) | |
tree | d48ba454695f9470e8a93c52920c03d345c5f0d1 /gtk/gtkcssstyleproperty.c | |
parent | 75a5f043526dc3023c2501b6c3e818a6e387c502 (diff) | |
download | gtk+-c8e57d63ecbf099f54949cc5e3151d04c1115d75.tar.gz |
cssstyelproperty: Rempove specified-type and computed-type props
This removes the necessity to keep a GType associated with style
properties and code can now make use of GtkCssValue completely.
Diffstat (limited to 'gtk/gtkcssstyleproperty.c')
-rw-r--r-- | gtk/gtkcssstyleproperty.c | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/gtk/gtkcssstyleproperty.c b/gtk/gtkcssstyleproperty.c index df8dc09c76..6921b08343 100644 --- a/gtk/gtkcssstyleproperty.c +++ b/gtk/gtkcssstyleproperty.c @@ -42,8 +42,6 @@ enum { PROP_0, PROP_ID, - PROP_SPECIFIED_TYPE, - PROP_COMPUTED_TYPE, PROP_INHERIT, PROP_INITIAL }; @@ -79,10 +77,6 @@ gtk_css_style_property_set_property (GObject *object, property->initial_value = g_value_dup_boxed (value); g_assert (property->initial_value != NULL); break; - case PROP_COMPUTED_TYPE: - property->computed_type = g_value_get_gtype (value); - g_assert (property->computed_type != G_TYPE_NONE); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -99,12 +93,6 @@ gtk_css_style_property_get_property (GObject *object, switch (prop_id) { - case PROP_SPECIFIED_TYPE: - g_value_set_gtype (value, G_VALUE_TYPE (&property->initial_value)); - break; - case PROP_COMPUTED_TYPE: - g_value_set_gtype (value, property->computed_type); - break; case PROP_ID: g_value_set_boolean (value, property->id); break; @@ -234,20 +222,6 @@ _gtk_css_style_property_class_init (GtkCssStylePropertyClass *klass) 0, G_MAXUINT, 0, G_PARAM_READABLE)); g_object_class_install_property (object_class, - PROP_SPECIFIED_TYPE, - g_param_spec_gtype ("specified-type", - P_("Specified type"), - P_("The type of values after parsing"), - G_TYPE_NONE, - G_PARAM_READABLE)); - g_object_class_install_property (object_class, - PROP_COMPUTED_TYPE, - g_param_spec_gtype ("computed-type", - P_("Computed type"), - P_("The type of values after style lookup"), - G_TYPE_NONE, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - g_object_class_install_property (object_class, PROP_INHERIT, g_param_spec_boolean ("inherit", P_("Inherit"), @@ -416,45 +390,6 @@ _gtk_css_style_property_get_initial_value (GtkCssStyleProperty *property) } /** - * _gtk_css_style_property_get_computed_type: - * @property: the property to query - * - * Gets the #GType used for values for this property after a CSS lookup has - * happened. _gtk_css_style_property_compute_value() will convert values to - * this type. - * - * Returns: the #GType used for computed values. - **/ -GType -_gtk_css_style_property_get_computed_type (GtkCssStyleProperty *property) -{ - g_return_val_if_fail (GTK_IS_CSS_STYLE_PROPERTY (property), G_TYPE_NONE); - - return property->computed_type; -} - -/** - * _gtk_css_style_property_get_specified_type: - * @property: the property to query - * - * Gets the #GType used for values for this property after CSS parsing if - * the value is not a special keyword. _gtk_css_style_property_compute_value() - * will convert values of this type to the computed type. - * - * The initial value returned by _gtk_css_style_property_get_initial_value() - * will be of this type. - * - * Returns: the #GType used for specified values. - **/ -GType -_gtk_css_style_property_get_specified_type (GtkCssStyleProperty *property) -{ - g_return_val_if_fail (GTK_IS_CSS_STYLE_PROPERTY (property), G_TYPE_NONE); - - return _gtk_css_value_get_content_type (property->initial_value); -} - -/** * _gtk_css_style_property_compute_value: * @property: the property * @computed: (out): an uninitialized value to be filled with the result |