cssvalue: Add _gtk_css_initial_value_get()

... so we don't bump a refcount whenever we get the initial singleton.

We want to use this function instead of
_gtk_css_style_property_get_initial_value() everywhere where we compute
values, because some initial values may depend on settings soon.
This commit is contained in:
Benjamin Otte 2012-11-25 15:31:59 +01:00
parent 2ab65ef771
commit f204473ee0
2 changed files with 7 additions and 0 deletions

View File

@ -86,3 +86,9 @@ _gtk_css_initial_value_new (void)
{
return _gtk_css_value_ref (&initial);
}
GtkCssValue *
_gtk_css_initial_value_get (void)
{
return &initial;
}

View File

@ -25,6 +25,7 @@
G_BEGIN_DECLS
GtkCssValue * _gtk_css_initial_value_new (void);
GtkCssValue * _gtk_css_initial_value_get (void);
G_END_DECLS