1/*
2 * Copyright © 2011 Red Hat Inc.
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.1 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 * Authors: Benjamin Otte <otte@gnome.org>
18 */
19
20#ifndef __GTK_CSS_SHORTHAND_PROPERTY_PRIVATE_H__
21#define __GTK_CSS_SHORTHAND_PROPERTY_PRIVATE_H__
22
23#include <glib-object.h>
24
25#include <gtk/css/gtkcss.h>
26#include "gtk/css/gtkcsstokenizerprivate.h"
27#include "gtk/css/gtkcssparserprivate.h"
28#include "gtk/gtkcssstylepropertyprivate.h"
29#include "gtk/gtkstylepropertyprivate.h"
30
31G_BEGIN_DECLS
32
33#define GTK_TYPE_CSS_SHORTHAND_PROPERTY (_gtk_css_shorthand_property_get_type ())
34#define GTK_CSS_SHORTHAND_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, GTK_TYPE_CSS_SHORTHAND_PROPERTY, GtkCssShorthandProperty))
35#define GTK_CSS_SHORTHAND_PROPERTY_CLASS(cls) (G_TYPE_CHECK_CLASS_CAST (cls, GTK_TYPE_CSS_SHORTHAND_PROPERTY, GtkCssShorthandPropertyClass))
36#define GTK_IS_CSS_SHORTHAND_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, GTK_TYPE_CSS_SHORTHAND_PROPERTY))
37#define GTK_IS_CSS_SHORTHAND_PROPERTY_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE (obj, GTK_TYPE_CSS_SHORTHAND_PROPERTY))
38#define GTK_CSS_SHORTHAND_PROPERTY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CSS_SHORTHAND_PROPERTY, GtkCssShorthandPropertyClass))
39
40typedef struct _GtkCssShorthandProperty GtkCssShorthandProperty;
41typedef struct _GtkCssShorthandPropertyClass GtkCssShorthandPropertyClass;
42
43typedef gboolean (* GtkCssShorthandPropertyParseFunc) (GtkCssShorthandProperty *shorthand,
44 GtkCssValue **values,
45 GtkCssParser *parser);
46
47struct _GtkCssShorthandProperty
48{
49 GtkStyleProperty parent;
50
51 GPtrArray *subproperties;
52
53 GtkCssShorthandPropertyParseFunc parse;
54};
55
56struct _GtkCssShorthandPropertyClass
57{
58 GtkStylePropertyClass parent_class;
59};
60
61void _gtk_css_shorthand_property_init_properties (void);
62
63GType _gtk_css_shorthand_property_get_type (void) G_GNUC_CONST;
64
65GtkCssStyleProperty * _gtk_css_shorthand_property_get_subproperty (GtkCssShorthandProperty *shorthand,
66 guint property);
67guint _gtk_css_shorthand_property_get_n_subproperties (GtkCssShorthandProperty *shorthand) G_GNUC_CONST;
68
69
70G_END_DECLS
71
72#endif /* __GTK_CSS_SHORTHAND_PROPERTY_PRIVATE_H__ */
73

source code of gtk/gtk/gtkcssshorthandpropertyprivate.h