summaryrefslogtreecommitdiff
path: root/gtk/gtkcssnumbervalue.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-04-04 17:42:45 +0200
committerBenjamin Otte <otte@redhat.com>2012-04-17 08:59:19 +0200
commit1170ecfd2ef2043330c961339948bf89021d9816 (patch)
tree0b2457d206450a28b22697995ccb464f3e8dfceb /gtk/gtkcssnumbervalue.c
parent56f79fecce885e05b7fe1677a70b98c64ea4a85c (diff)
downloadgtk+-1170ecfd2ef2043330c961339948bf89021d9816.tar.gz
cssvalue: Convert border-image-width to border value
Diffstat (limited to 'gtk/gtkcssnumbervalue.c')
-rw-r--r--gtk/gtkcssnumbervalue.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk/gtkcssnumbervalue.c b/gtk/gtkcssnumbervalue.c
index e7c04d9d38..531942bca3 100644
--- a/gtk/gtkcssnumbervalue.c
+++ b/gtk/gtkcssnumbervalue.c
@@ -141,6 +141,14 @@ _gtk_css_number_value_parse (GtkCssParser *parser,
return _gtk_css_number_value_new (number.value, number.unit);
}
+GtkCssUnit
+_gtk_css_number_value_get_unit (const GtkCssValue *value)
+{
+ g_return_val_if_fail (value->class == &GTK_CSS_VALUE_NUMBER, GTK_CSS_NUMBER);
+
+ return value->unit;
+}
+
double
_gtk_css_number_value_get (const GtkCssValue *number,
double one_hundred_percent)