[gtk+] cssvalue: Add _gtk_css_initial_value_get()



commit f204473ee0d3c629cd15591bf296db08b003a16a
Author: Benjamin Otte <otte redhat com>
Date:   Sun Nov 25 15:31:59 2012 +0100

    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.

 gtk/gtkcssinitialvalue.c        |    6 ++++++
 gtk/gtkcssinitialvalueprivate.h |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssinitialvalue.c b/gtk/gtkcssinitialvalue.c
index 36ca6a0..c9d2534 100644
--- a/gtk/gtkcssinitialvalue.c
+++ b/gtk/gtkcssinitialvalue.c
@@ -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;
+}
diff --git a/gtk/gtkcssinitialvalueprivate.h b/gtk/gtkcssinitialvalueprivate.h
index cee9310..185e1be 100644
--- a/gtk/gtkcssinitialvalueprivate.h
+++ b/gtk/gtkcssinitialvalueprivate.h
@@ -25,6 +25,7 @@
 G_BEGIN_DECLS
 
 GtkCssValue *   _gtk_css_initial_value_new            (void);
+GtkCssValue *   _gtk_css_initial_value_get            (void);
 
 G_END_DECLS
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]