1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 2011 Red Hat, Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
20 #include "gtkcssinheritvalueprivate.h"
27 gtk_css_value_inherit_free (GtkCssValue *value)
29 /* Can only happen if the unique value gets unreffed too often */
30 g_assert_not_reached ();
34 gtk_css_value_inherit_equal (const GtkCssValue *value1,
35 const GtkCssValue *value2)
41 gtk_css_value_inherit_print (const GtkCssValue *value,
44 g_string_append (string, "inherit");
47 static const GtkCssValueClass GTK_CSS_VALUE_INHERIT = {
48 gtk_css_value_inherit_free,
49 gtk_css_value_inherit_equal,
50 gtk_css_value_inherit_print
53 static GtkCssValue inherit = { >K_CSS_VALUE_INHERIT, 1 };
56 _gtk_css_inherit_value_new (void)
58 return _gtk_css_value_ref (&inherit);
62 _gtk_css_value_is_inherit (const GtkCssValue *value)
64 g_return_val_if_fail (value != NULL, FALSE);
66 return value == &inherit;