Commit bc9060a5 authored by Benjamin Otte's avatar Benjamin Otte

styleproperty: Make gtk_style_property_register() not be valist

Instead, make the caller create a GtkCssValue in advance.
parent ffe50c3b
This diff is collapsed.
......@@ -246,6 +246,20 @@ g_boxed_copy0 (GType boxed_type,
return g_boxed_copy (boxed_type, src_boxed);
}
GtkCssValue *
_gtk_css_value_new_from_boxed (GType type,
gpointer boxed)
{
GtkCssValue *value;
g_return_val_if_fail (g_type_is_a (type, G_TYPE_BOXED), NULL);
value = gtk_css_value_new (type);
value->u.ptr = g_boxed_copy0 (type, boxed);
return value;
}
GtkCssValue *
_gtk_css_value_new_take_pattern (cairo_pattern_t *v)
{
......@@ -279,6 +293,17 @@ _gtk_css_value_new_take_image (GtkCssImage *v)
return value;
}
GtkCssValue *
_gtk_css_value_new_from_theming_engine (GtkThemingEngine *v)
{
GtkCssValue *value;
value = gtk_css_value_new (GTK_TYPE_THEMING_ENGINE);
value->u.ptr = g_object_ref (v);
return value;
}
GtkCssValue *
_gtk_css_value_new_take_binding_sets (GPtrArray *array)
{
......@@ -388,6 +413,17 @@ _gtk_css_value_new_from_border_corner_radius (const GtkCssBorderCornerRadius *v)
return value;
}
GtkCssValue *
_gtk_css_value_new_from_border_image_repeat (const GtkCssBorderImageRepeat *v)
{
GtkCssValue *value;
value = gtk_css_value_new (GTK_TYPE_CSS_BORDER_IMAGE_REPEAT);
value->u.ptr = g_boxed_copy0 (GTK_TYPE_CSS_BORDER_IMAGE_REPEAT, v);
return value;
}
GtkCssValue *
_gtk_css_value_new_from_border_style (GtkBorderStyle style)
{
......
......@@ -79,17 +79,21 @@ GtkCssValue *_gtk_css_value_new_from_enum (GType
GtkCssValue *_gtk_css_value_new_from_double (double d);
GtkCssValue *_gtk_css_value_new_take_string (char *string);
GtkCssValue *_gtk_css_value_new_take_strv (char **strv);
GtkCssValue *_gtk_css_value_new_from_boxed (GType type,
gpointer boxed);
GtkCssValue *_gtk_css_value_new_from_rgba (const GdkRGBA *v);
GtkCssValue *_gtk_css_value_new_from_color (const GdkColor *v);
GtkCssValue *_gtk_css_value_new_take_symbolic_color (GtkSymbolicColor *v);
GtkCssValue *_gtk_css_value_new_take_pattern (cairo_pattern_t *v);
GtkCssValue *_gtk_css_value_new_take_shadow (GtkShadow *v);
GtkCssValue *_gtk_css_value_new_take_image (GtkCssImage *v);
GtkCssValue *_gtk_css_value_new_from_theming_engine (GtkThemingEngine *v);
GtkCssValue *_gtk_css_value_new_from_number (const GtkCssNumber *v);
GtkCssValue *_gtk_css_value_new_take_binding_sets (GPtrArray *array);
GtkCssValue *_gtk_css_value_new_from_background_size (const GtkCssBackgroundSize *v);
GtkCssValue *_gtk_css_value_new_from_background_position (const GtkCssBackgroundPosition *v);
GtkCssValue *_gtk_css_value_new_from_border_corner_radius (const GtkCssBorderCornerRadius *v);
GtkCssValue *_gtk_css_value_new_from_border_image_repeat (const GtkCssBorderImageRepeat *v);
GtkCssValue *_gtk_css_value_new_from_border_style (GtkBorderStyle style);
void _gtk_css_value_init_gvalue (const GtkCssValue *value,
GValue *g_value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment