summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2012-03-16 22:13:04 +0100
committerBenjamin Otte <otte@redhat.com>2012-03-17 05:13:22 +0100
commitb874e6c3cfb896faf407ae52eb2a464a1d6bfacb (patch)
tree570d013ca196f47ac959268325a0a6c1e5d87cc7 /gtk
parentca07559672ffb7f3ee8d490d62083e191b7d695a (diff)
downloadgtk+-b874e6c3cfb896faf407ae52eb2a464a1d6bfacb.tar.gz
css: Support GtkBackgroundPosition in cssvalue
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkcssvalue.c18
-rw-r--r--gtk/gtkcssvalueprivate.h2
2 files changed, 20 insertions, 0 deletions
diff --git a/gtk/gtkcssvalue.c b/gtk/gtkcssvalue.c
index 56c4eac1e3..07d254222a 100644
--- a/gtk/gtkcssvalue.c
+++ b/gtk/gtkcssvalue.c
@@ -348,6 +348,17 @@ _gtk_css_value_new_from_background_size (const GtkCssBackgroundSize *v)
}
GtkCssValue *
+_gtk_css_value_new_from_background_position (const GtkCssBackgroundPosition *v)
+{
+ GtkCssValue *value;
+
+ value = _gtk_css_value_new (GTK_TYPE_CSS_BACKGROUND_POSITION);
+ value->u.ptr = g_boxed_copy0 (GTK_TYPE_CSS_BACKGROUND_POSITION, v);
+
+ return value;
+}
+
+GtkCssValue *
_gtk_css_value_new_take_symbolic_color (GtkSymbolicColor *v)
{
GtkCssValue *value;
@@ -564,6 +575,13 @@ _gtk_css_value_get_background_size (GtkCssValue *value)
return value->u.ptr;
}
+GtkCssBackgroundPosition *
+_gtk_css_value_get_background_position (GtkCssValue *value)
+{
+ g_return_val_if_fail (_gtk_css_value_holds (value, GTK_TYPE_CSS_BACKGROUND_POSITION), NULL);
+ return value->u.ptr;
+}
+
GtkCssBorderImageRepeat *
_gtk_css_value_get_border_image_repeat (GtkCssValue *value)
{
diff --git a/gtk/gtkcssvalueprivate.h b/gtk/gtkcssvalueprivate.h
index 62f17a320f..ceec4efbc4 100644
--- a/gtk/gtkcssvalueprivate.h
+++ b/gtk/gtkcssvalueprivate.h
@@ -61,6 +61,7 @@ GtkCssValue *_gtk_css_value_new_take_shadow (GtkShadow
GtkCssValue *_gtk_css_value_new_take_image (GtkCssImage *v);
GtkCssValue *_gtk_css_value_new_from_number (const GtkCssNumber *v);
GtkCssValue *_gtk_css_value_new_from_background_size (const GtkCssBackgroundSize *v);
+GtkCssValue *_gtk_css_value_new_from_background_position (const GtkCssBackgroundPosition *v);
void _gtk_css_value_to_gvalue (GtkCssValue *value,
GValue *g_value);
void _gtk_css_value_init_gvalue (GtkCssValue *value,
@@ -80,6 +81,7 @@ GtkSymbolicColor *_gtk_css_value_get_symbolic_color (GtkCssValue
GtkCssImage *_gtk_css_value_get_image (GtkCssValue *value);
GtkBorderStyle _gtk_css_value_get_border_style (GtkCssValue *value);
GtkCssBackgroundSize *_gtk_css_value_get_background_size (GtkCssValue *value);
+GtkCssBackgroundPosition *_gtk_css_value_get_background_position (GtkCssValue *value);
GtkCssBorderCornerRadius *_gtk_css_value_get_border_corner_radius (GtkCssValue *value);
GtkCssBorderImageRepeat *_gtk_css_value_get_border_image_repeat (GtkCssValue *value);
PangoFontDescription * _gtk_css_value_get_font_description (GtkCssValue *value);