#include "gtkcssinheritvalueprivate.h"
+#include "gtkcssinitialvalueprivate.h"
+#include "gtkstylecontextprivate.h"
+
struct _GtkCssValue {
GTK_CSS_VALUE_BASE
};
g_assert_not_reached ();
}
+static GtkCssValue *
+gtk_css_value_inherit_compute (GtkCssValue *value,
+ guint property_id,
+ GtkStyleProviderPrivate *provider,
+ GtkCssComputedValues *values,
+ GtkCssComputedValues *parent_values,
+ GtkCssDependencies *dependencies)
+{
+ if (parent_values)
+ {
+ *dependencies = GTK_CSS_EQUALS_PARENT;
+ return _gtk_css_value_ref (_gtk_css_computed_values_get_value (parent_values, property_id));
+ }
+ else
+ {
+ return _gtk_css_value_compute (_gtk_css_initial_value_get (),
+ property_id,
+ provider,
+ values,
+ parent_values,
+ dependencies);
+ }
+}
+
+static gboolean
+gtk_css_value_inherit_equal (const GtkCssValue *value1,
+ const GtkCssValue *value2)
+{
+ return TRUE;
+}
+
+static GtkCssValue *
+gtk_css_value_inherit_transition (GtkCssValue *start,
+ GtkCssValue *end,
+ guint property_id,
+ double progress)
+{
+ return NULL;
+}
+
static void
gtk_css_value_inherit_print (const GtkCssValue *value,
GString *string)
static const GtkCssValueClass GTK_CSS_VALUE_INHERIT = {
gtk_css_value_inherit_free,
+ gtk_css_value_inherit_compute,
+ gtk_css_value_inherit_equal,
+ gtk_css_value_inherit_transition,
gtk_css_value_inherit_print
};
{
return _gtk_css_value_ref (&inherit);
}
-
-gboolean
-_gtk_css_value_is_inherit (const GtkCssValue *value)
-{
- g_return_val_if_fail (value != NULL, FALSE);
-
- return value == &inherit;
-}