]> Pileus Git - ~andy/gtk/blob - gtk/gtkstyleset.h
Move GtkChildClassFlags to gtkenums.h.
[~andy/gtk] / gtk / gtkstyleset.h
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, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __GTK_STYLE_SET_H__
21 #define __GTK_STYLE_SET_H__
22
23 #include <glib-object.h>
24 #include <gdk/gdk.h>
25 #include "gtkenums.h"
26
27 /* GtkBorder is defined there */
28 #include "gtkstyle.h"
29
30 G_BEGIN_DECLS
31
32 #define GTK_TYPE_STYLE_SET         (gtk_style_set_get_type ())
33 #define GTK_STYLE_SET(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_STYLE_SET, GtkStyleSet))
34 #define GTK_STYLE_SET_CLASS(c)     (G_TYPE_CHECK_CLASS_CAST    ((c), GTK_TYPE_STYLE_SET, GtkStyleSetClass))
35 #define GTK_IS_STYLE_SET(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_STYLE_SET))
36 #define GTK_IS_STYLE_SET_CLASS(c)  (G_TYPE_CHECK_CLASS_TYPE    ((c), GTK_TYPE_STYLE_SET))
37 #define GTK_STYLE_SET_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS  ((o), GTK_TYPE_STYLE_SET, GtkStyleSetClass))
38
39 typedef struct GtkStyleSet GtkStyleSet;
40 typedef struct GtkStyleSetClass GtkStyleSetClass;
41
42 struct GtkStyleSet
43 {
44   GObject parent_object;
45 };
46
47 struct GtkStyleSetClass
48 {
49   GObjectClass parent_class;
50 };
51
52 GType gtk_style_set_get_type (void) G_GNUC_CONST;
53
54 /* Functions to register style properties */
55 void     gtk_style_set_register_property (const gchar  *property_name,
56                                           GType         type,
57                                           const GValue *default_value);
58 gboolean gtk_style_set_lookup_property   (const gchar  *property_name,
59                                           GType        *type,
60                                           GValue       *default_value);
61
62 void gtk_style_set_register_property_color  (const gchar *property_name,
63                                              GdkColor    *default_value);
64 void gtk_style_set_register_property_font   (const gchar          *property_name,
65                                              PangoFontDescription *initial_value);
66 void gtk_style_set_register_property_border (const gchar *property_name,
67                                              GtkBorder   *initial_value);
68 void gtk_style_set_register_property_int    (const gchar *property_name,
69                                              gint         default_value);
70 void gtk_style_set_register_property_uint   (const gchar *property_name,
71                                              guint        default_value);
72 void gtk_style_set_register_property_double (const gchar *property_name,
73                                              gdouble      default_value);
74
75
76 GtkStyleSet * gtk_style_set_new (void);
77
78 void     gtk_style_set_set_property (GtkStyleSet  *set,
79                                      const gchar  *property,
80                                      GtkStateType  state,
81                                      const GValue *value);
82 void     gtk_style_set_set_valist   (GtkStyleSet  *set,
83                                      GtkStateType  state,
84                                      va_list       args);
85 void     gtk_style_set_set          (GtkStyleSet  *set,
86                                      GtkStateType  state,
87                                      ...) G_GNUC_NULL_TERMINATED;
88
89 gboolean gtk_style_set_get_property (GtkStyleSet  *set,
90                                      const gchar  *property,
91                                      GtkStateType  state,
92                                      GValue       *value);
93 void     gtk_style_set_get_valist   (GtkStyleSet  *set,
94                                      GtkStateType  state,
95                                      va_list       args);
96 void     gtk_style_set_get          (GtkStyleSet  *set,
97                                      GtkStateType  state,
98                                      ...) G_GNUC_NULL_TERMINATED;
99
100 void     gtk_style_set_unset_property (GtkStyleSet  *set,
101                                        const gchar  *property,
102                                        GtkStateType  state);
103
104 void     gtk_style_set_clear          (GtkStyleSet  *set);
105
106 void     gtk_style_set_merge          (GtkStyleSet       *set,
107                                        const GtkStyleSet *set_to_merge,
108                                        gboolean           replace);
109
110 G_END_DECLS
111
112 #endif /* __GTK_STYLE_PROPERTY_SET_H__ */