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_STYLE_SET_H__
21 #define __GTK_STYLE_SET_H__
23 #include <glib-object.h>
27 /* GtkBorder is defined there */
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))
39 typedef struct GtkStyleSet GtkStyleSet;
40 typedef struct GtkStyleSetClass GtkStyleSetClass;
44 GObject parent_object;
47 struct GtkStyleSetClass
49 GObjectClass parent_class;
52 GType gtk_style_set_get_type (void) G_GNUC_CONST;
54 /* Functions to register style properties */
55 void gtk_style_set_register_property (const gchar *property_name,
57 const GValue *default_value);
58 gboolean gtk_style_set_lookup_property (const gchar *property_name,
60 GValue *default_value);
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,
70 void gtk_style_set_register_property_uint (const gchar *property_name,
72 void gtk_style_set_register_property_double (const gchar *property_name,
73 gdouble default_value);
76 GtkStyleSet * gtk_style_set_new (void);
78 void gtk_style_set_set_property (GtkStyleSet *set,
79 const gchar *property,
82 void gtk_style_set_set_valist (GtkStyleSet *set,
85 void gtk_style_set_set (GtkStyleSet *set,
87 ...) G_GNUC_NULL_TERMINATED;
89 gboolean gtk_style_set_get_property (GtkStyleSet *set,
90 const gchar *property,
93 void gtk_style_set_get_valist (GtkStyleSet *set,
96 void gtk_style_set_get (GtkStyleSet *set,
98 ...) G_GNUC_NULL_TERMINATED;
100 void gtk_style_set_unset_property (GtkStyleSet *set,
101 const gchar *property,
104 void gtk_style_set_clear (GtkStyleSet *set);
106 void gtk_style_set_merge (GtkStyleSet *set,
107 const GtkStyleSet *set_to_merge,
112 #endif /* __GTK_STYLE_PROPERTY_SET_H__ */