]> Pileus Git - ~andy/gtk/blob - gtk/gtkthemingengine.h
GtkThemingEngine: Add accessors to style classes.
[~andy/gtk] / gtk / gtkthemingengine.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_THEMING_ENGINE_H__
21 #define __GTK_THEMING_ENGINE_H__
22
23 #include <glib-object.h>
24 #include <cairo.h>
25
26 #include <gtk/gtkstylecontext.h>
27 #include <gtk/gtkwidgetpath.h>
28 #include <gtk/gtkenums.h>
29
30 G_BEGIN_DECLS
31
32 #define GTK_TYPE_THEMING_ENGINE         (gtk_theming_engine_get_type ())
33 #define GTK_THEMING_ENGINE(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_THEMING_ENGINE, GtkThemingEngine))
34 #define GTK_THEMING_ENGINE_CLASS(c)     (G_TYPE_CHECK_CLASS_CAST    ((c), GTK_TYPE_THEMING_ENGINE, GtkThemingEngineClass))
35 #define GTK_IS_THEMING_ENGINE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_THEMING_ENGINE))
36 #define GTK_IS_THEMING_ENGINE_CLASS(c)  (G_TYPE_CHECK_CLASS_TYPE    ((c), GTK_TYPE_THEMING_ENGINE))
37 #define GTK_THEMING_ENGINE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS  ((o), GTK_TYPE_THEMING_ENGINE, GtkThemingEngineClass))
38
39 typedef struct GtkThemingEngine GtkThemingEngine;
40 typedef struct GtkThemingEngineClass GtkThemingEngineClass;
41
42 struct GtkThemingEngine
43 {
44   GObject parent_object;
45   gpointer priv;
46 };
47
48 struct GtkThemingEngineClass
49 {
50   GObjectClass parent_class;
51 };
52
53 GType gtk_theming_engine_get_type (void) G_GNUC_CONST;
54
55 void _gtk_theming_engine_set_context (GtkThemingEngine *engine,
56                                       GtkStyleContext  *context);
57
58 void gtk_theming_engine_get_property (GtkThemingEngine *engine,
59                                       const gchar      *property,
60                                       GtkStateType      state,
61                                       GValue           *value);
62 void gtk_theming_engine_get_valist   (GtkThemingEngine *engine,
63                                       GtkStateType      state,
64                                       va_list           args);
65 void gtk_theming_engine_get          (GtkThemingEngine *engine,
66                                       GtkStateType      state,
67                                       ...) G_GNUC_NULL_TERMINATED;
68
69 G_CONST_RETURN GtkWidgetPath * gtk_theming_engine_get_path (GtkThemingEngine *engine);
70
71 gboolean gtk_theming_engine_has_class        (GtkThemingEngine *engine,
72                                               const gchar      *style_class);
73 gboolean gtk_theming_engine_has_child_class (GtkThemingEngine   *engine,
74                                              const gchar        *style_class,
75                                              GtkChildClassFlags *flags);
76
77 GtkStateFlags gtk_theming_engine_get_state     (GtkThemingEngine *engine);
78 gboolean      gtk__theming_engine_is_state_set (GtkThemingEngine *engine,
79                                                 GtkStateType      state);
80
81 G_CONST_RETURN GtkThemingEngine * gtk_theming_engine_load (const gchar *name);
82
83
84 G_END_DECLS
85
86 #endif /* __GTK_THEMING_ENGINE_H__ */