[gtk+/wip/css-background-position: 2/4] css: Support GtkBackgroundPosition in cssvalue
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/css-background-position: 2/4] css: Support GtkBackgroundPosition in cssvalue
- Date: Fri, 16 Mar 2012 21:15:50 +0000 (UTC)
commit b2892c1dec06c3e16c626a60e361d819d1838fed
Author: Alexander Larsson <alexl redhat com>
Date: Fri Mar 16 22:13:04 2012 +0100
css: Support GtkBackgroundPosition in cssvalue
gtk/gtkcssvalue.c | 18 ++++++++++++++++++
gtk/gtkcssvalueprivate.h | 2 ++
2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssvalue.c b/gtk/gtkcssvalue.c
index 56c4eac..07d2542 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 62f17a3..ceec4ef 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]