1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 2010 Carlos Garnacho <carlosg@gnome.org>
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, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #ifndef __GTK_STYLEPROPERTY_PRIVATE_H__
21 #define __GTK_STYLEPROPERTY_PRIVATE_H__
23 #include "gtkcssparserprivate.h"
24 #include "gtkstylecontextprivate.h"
28 typedef struct _GtkStyleProperty GtkStyleProperty;
30 GTK_STYLE_PROPERTY_INHERIT = (1 << 0)
31 } GtkStylePropertyFlags;
33 typedef GParameter * (* GtkStyleUnpackFunc) (const GValue *value,
35 typedef void (* GtkStylePackFunc) (GValue *value,
36 GtkStyleProperties *props,
38 GtkStylePropertyContext *context);
39 typedef gboolean (* GtkStyleParseFunc) (GtkCssParser *parser,
42 typedef void (* GtkStylePrintFunc) (const GValue *value,
44 typedef void (* GtkStyleUnsetFunc) (GtkStyleProperties *props,
48 struct _GtkStyleProperty
51 GtkStylePropertyFlags flags;
55 GtkStylePropertyParser property_parse_func;
56 GtkStyleUnpackFunc unpack_func;
57 GtkStylePackFunc pack_func;
58 GtkStyleParseFunc parse_func;
59 GtkStylePrintFunc print_func;
60 GtkStyleUnsetFunc unset_func;
63 guint _gtk_style_property_get_count (void);
64 const GtkStyleProperty * _gtk_style_property_get (guint id);
66 const GtkStyleProperty * _gtk_style_property_lookup (const char *name);
68 void _gtk_style_property_register (GParamSpec *pspec,
69 GtkStylePropertyFlags flags,
70 GtkStylePropertyParser property_parse_func,
71 GtkStyleUnpackFunc unpack_func,
72 GtkStylePackFunc pack_func,
73 GtkStyleParseFunc parse_func,
74 GtkStylePrintFunc print_func,
75 const GValue *initial_value,
76 GtkStyleUnsetFunc unset_func);
78 gboolean _gtk_style_property_is_inherit (const GtkStyleProperty *property);
79 guint _gtk_style_property_get_id (const GtkStyleProperty *property);
81 void _gtk_style_property_default_value (const GtkStyleProperty *property,
82 GtkStyleProperties *properties,
86 void _gtk_style_property_resolve (const GtkStyleProperty *property,
87 GtkStyleProperties *properties,
89 GtkStylePropertyContext *context,
93 gboolean _gtk_style_property_is_shorthand (const GtkStyleProperty *property);
94 GParameter * _gtk_style_property_unpack (const GtkStyleProperty *property,
97 void _gtk_style_property_pack (const GtkStyleProperty *property,
98 GtkStyleProperties *props,
100 GtkStylePropertyContext *context,
103 gboolean _gtk_style_property_parse_value (const GtkStyleProperty *property,
105 GtkCssParser *parser,
107 void _gtk_style_property_print_value (const GtkStyleProperty *property,
113 #endif /* __GTK_CSS_STYLEPROPERTY_PRIVATE_H__ */