1/* GTK - The GIMP Toolkit
2 * Copyright (C) 2010 Carlos Garnacho <carlosg@gnome.org>
3 *
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.
8 *
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.
13 *
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/>.
16 */
17
18#ifndef __GTK_STYLEPROPERTY_PRIVATE_H__
19#define __GTK_STYLEPROPERTY_PRIVATE_H__
20
21#include <gtk/css/gtkcss.h>
22#include "gtk/css/gtkcsstokenizerprivate.h"
23#include "gtk/css/gtkcssparserprivate.h"
24#include "gtkstylecontextprivate.h"
25#include "gtkcssvalueprivate.h"
26
27G_BEGIN_DECLS
28
29#define GTK_TYPE_STYLE_PROPERTY (_gtk_style_property_get_type ())
30#define GTK_STYLE_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, GTK_TYPE_STYLE_PROPERTY, GtkStyleProperty))
31#define GTK_STYLE_PROPERTY_CLASS(cls) (G_TYPE_CHECK_CLASS_CAST (cls, GTK_TYPE_STYLE_PROPERTY, GtkStylePropertyClass))
32#define GTK_IS_STYLE_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, GTK_TYPE_STYLE_PROPERTY))
33#define GTK_IS_STYLE_PROPERTY_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE (obj, GTK_TYPE_STYLE_PROPERTY))
34#define GTK_STYLE_PROPERTY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_STYLE_PROPERTY, GtkStylePropertyClass))
35
36typedef struct _GtkStyleProperty GtkStyleProperty;
37typedef struct _GtkStylePropertyClass GtkStylePropertyClass;
38
39typedef GtkCssValue * (* GtkStyleQueryFunc) (guint id,
40 gpointer data);
41
42struct _GtkStyleProperty
43{
44 GObject parent;
45
46 char *name;
47};
48
49struct _GtkStylePropertyClass
50{
51 GObjectClass parent_class;
52
53 GtkCssValue * (* parse_value) (GtkStyleProperty * property,
54 GtkCssParser *parser);
55
56 GHashTable *properties;
57};
58
59GType _gtk_style_property_get_type (void) G_GNUC_CONST;
60
61void _gtk_style_property_init_properties (void);
62
63GtkStyleProperty * _gtk_style_property_lookup (const char *name);
64
65const char * _gtk_style_property_get_name (GtkStyleProperty *property);
66
67GtkCssValue * _gtk_style_property_parse_value (GtkStyleProperty * property,
68 GtkCssParser *parser);
69
70G_END_DECLS
71
72#endif /* __GTK_CSS_STYLEPROPERTY_PRIVATE_H__ */
73

source code of gtk/gtk/gtkstylepropertyprivate.h