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"
27 typedef struct _GtkStyleProperty GtkStyleProperty;
29 GTK_STYLE_PROPERTY_INHERIT = (1 << 0)
30 } GtkStylePropertyFlags;
32 typedef GParameter * (* GtkStyleUnpackFunc) (const GValue *value,
34 typedef void (* GtkStylePackFunc) (GValue *value,
35 GtkStyleProperties *props,
37 typedef gboolean (* GtkStyleParseFunc) (GtkCssParser *parser,
40 typedef void (* GtkStylePrintFunc) (const GValue *value,
42 typedef void (* GtkStyleDefaultValueFunc) (GtkStyleProperties *props,
47 struct _GtkStyleProperty
50 GtkStylePropertyFlags flags;
52 GtkStylePropertyParser property_parse_func;
53 GtkStyleUnpackFunc unpack_func;
54 GtkStylePackFunc pack_func;
55 GtkStyleParseFunc parse_func;
56 GtkStylePrintFunc print_func;
57 GtkStyleDefaultValueFunc default_value_func;
60 const GtkStyleProperty * _gtk_style_property_lookup (const char *name);
62 void _gtk_style_property_register (GParamSpec *pspec,
63 GtkStylePropertyFlags flags,
64 GtkStylePropertyParser property_parse_func,
65 GtkStyleUnpackFunc unpack_func,
66 GtkStylePackFunc pack_func,
67 GtkStyleParseFunc parse_func,
68 GtkStylePrintFunc print_func,
69 GtkStyleDefaultValueFunc default_value_func);
71 gboolean _gtk_style_property_is_inherit (const GtkStyleProperty *property);
73 void _gtk_style_property_default_value (const GtkStyleProperty *property,
74 GtkStyleProperties *properties,
78 void _gtk_style_property_resolve (const GtkStyleProperty *property,
79 GtkStyleProperties *properties,
83 gboolean _gtk_style_property_is_shorthand (const GtkStyleProperty *property);
84 GParameter * _gtk_style_property_unpack (const GtkStyleProperty *property,
87 void _gtk_style_property_pack (const GtkStyleProperty *property,
88 GtkStyleProperties *props,
92 gboolean _gtk_style_property_parse_value (const GtkStyleProperty *property,
96 void _gtk_style_property_print_value (const GtkStyleProperty *property,
102 #endif /* __GTK_CSS_STYLEPROPERTY_PRIVATE_H__ */