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_STYLE_PROPERTIES_H__
19#define __GTK_STYLE_PROPERTIES_H__
20
21#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
22#error "Only <gtk/gtk.h> can be included directly."
23#endif
24
25#include <glib-object.h>
26#include <gdk/gdk.h>
27#include <gtk/gtkenums.h>
28
29G_BEGIN_DECLS
30
31#define GTK_TYPE_STYLE_PROPERTIES (gtk_style_properties_get_type ())
32#define GTK_STYLE_PROPERTIES(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_STYLE_PROPERTIES, GtkStyleProperties))
33#define GTK_STYLE_PROPERTIES_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GTK_TYPE_STYLE_PROPERTIES, GtkStylePropertiesClass))
34#define GTK_IS_STYLE_PROPERTIES(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_STYLE_PROPERTIES))
35#define GTK_IS_STYLE_PROPERTIES_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GTK_TYPE_STYLE_PROPERTIES))
36#define GTK_STYLE_PROPERTIES_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_STYLE_PROPERTIES, GtkStylePropertiesClass))
37
38typedef struct _GtkStyleProperties GtkStyleProperties;
39typedef struct _GtkStylePropertiesClass GtkStylePropertiesClass;
40typedef struct _GtkStylePropertiesPrivate GtkStylePropertiesPrivate;
41
42typedef struct _GtkSymbolicColor GtkSymbolicColor;
43typedef struct _GtkGradient GtkGradient;
44
45struct _GtkStyleProperties
46{
47 /*< private >*/
48 GObject parent_object;
49 GtkStylePropertiesPrivate *priv;
50};
51
52struct _GtkStylePropertiesClass
53{
54 /*< private >*/
55 GObjectClass parent_class;
56
57 /* Padding for future expansion */
58 void (*_gtk_reserved1) (void);
59 void (*_gtk_reserved2) (void);
60 void (*_gtk_reserved3) (void);
61 void (*_gtk_reserved4) (void);
62};
63
64typedef gboolean (* GtkStylePropertyParser) (const gchar *string,
65 GValue *value,
66 GError **error);
67
68GDK_DEPRECATED_IN_3_16
69GType gtk_style_properties_get_type (void) G_GNUC_CONST;
70
71/* Next 2 are implemented in gtkcsscustomproperty.c */
72GDK_DEPRECATED_IN_3_8
73void gtk_style_properties_register_property (GtkStylePropertyParser parse_func,
74 GParamSpec *pspec);
75GDK_DEPRECATED_IN_3_8
76gboolean gtk_style_properties_lookup_property (const gchar *property_name,
77 GtkStylePropertyParser *parse_func,
78 GParamSpec **pspec);
79
80GDK_DEPRECATED_IN_3_16
81GtkStyleProperties * gtk_style_properties_new (void);
82
83GDK_DEPRECATED_IN_3_8
84void gtk_style_properties_map_color (GtkStyleProperties *props,
85 const gchar *name,
86 GtkSymbolicColor *color);
87GDK_DEPRECATED_IN_3_8
88GtkSymbolicColor * gtk_style_properties_lookup_color (GtkStyleProperties *props,
89 const gchar *name);
90
91GDK_DEPRECATED_IN_3_16
92void gtk_style_properties_set_property (GtkStyleProperties *props,
93 const gchar *property,
94 GtkStateFlags state,
95 const GValue *value);
96GDK_DEPRECATED_IN_3_16
97void gtk_style_properties_set_valist (GtkStyleProperties *props,
98 GtkStateFlags state,
99 va_list args);
100GDK_DEPRECATED_IN_3_16
101void gtk_style_properties_set (GtkStyleProperties *props,
102 GtkStateFlags state,
103 ...) G_GNUC_NULL_TERMINATED;
104
105GDK_DEPRECATED_IN_3_16
106gboolean gtk_style_properties_get_property (GtkStyleProperties *props,
107 const gchar *property,
108 GtkStateFlags state,
109 GValue *value);
110GDK_DEPRECATED_IN_3_16
111void gtk_style_properties_get_valist (GtkStyleProperties *props,
112 GtkStateFlags state,
113 va_list args);
114GDK_DEPRECATED_IN_3_16
115void gtk_style_properties_get (GtkStyleProperties *props,
116 GtkStateFlags state,
117 ...) G_GNUC_NULL_TERMINATED;
118
119GDK_DEPRECATED_IN_3_16
120void gtk_style_properties_unset_property (GtkStyleProperties *props,
121 const gchar *property,
122 GtkStateFlags state);
123
124GDK_DEPRECATED_IN_3_16
125void gtk_style_properties_clear (GtkStyleProperties *props);
126
127GDK_DEPRECATED_IN_3_16
128void gtk_style_properties_merge (GtkStyleProperties *props,
129 const GtkStyleProperties *props_to_merge,
130 gboolean replace);
131
132G_END_DECLS
133
134#endif /* __GTK_STYLE_PROPERTIES_H__ */
135

source code of include/gtk-3.0/gtk/deprecated/gtkstyleproperties.h