1 | /* GTK - The GIMP Toolkit |
2 | * Copyright (C) 2011 Benjamin Otte <otte@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_PROVIDER_PRIVATE_H__ |
19 | #define __GTK_STYLE_PROVIDER_PRIVATE_H__ |
20 | |
21 | #include <glib-object.h> |
22 | #include "gtk/gtkcountingbloomfilterprivate.h" |
23 | #include "gtk/gtkcsskeyframesprivate.h" |
24 | #include "gtk/gtkcsslookupprivate.h" |
25 | #include "gtk/gtkcssnodeprivate.h" |
26 | #include "gtk/gtkcssvalueprivate.h" |
27 | #include <gtk/gtktypes.h> |
28 | |
29 | G_BEGIN_DECLS |
30 | |
31 | #define GTK_STYLE_PROVIDER_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GTK_TYPE_STYLE_PROVIDER, GtkStyleProviderInterface)) |
32 | |
33 | typedef struct _GtkStyleProviderInterface GtkStyleProviderInterface; |
34 | |
35 | struct _GtkStyleProviderInterface |
36 | { |
37 | GTypeInterface g_iface; |
38 | |
39 | GtkCssValue * (* get_color) (GtkStyleProvider *provider, |
40 | const char *name); |
41 | GtkSettings * (* get_settings) (GtkStyleProvider *provider); |
42 | GtkCssKeyframes * (* get_keyframes) (GtkStyleProvider *provider, |
43 | const char *name); |
44 | int (* get_scale) (GtkStyleProvider *provider); |
45 | void (* lookup) (GtkStyleProvider *provider, |
46 | const GtkCountingBloomFilter *filter, |
47 | GtkCssNode *node, |
48 | GtkCssLookup *lookup, |
49 | GtkCssChange *out_change); |
50 | void (* emit_error) (GtkStyleProvider *provider, |
51 | GtkCssSection *section, |
52 | const GError *error); |
53 | /* signal */ |
54 | void (* changed) (GtkStyleProvider *provider); |
55 | }; |
56 | |
57 | GtkSettings * gtk_style_provider_get_settings (GtkStyleProvider *provider); |
58 | GtkCssValue * gtk_style_provider_get_color (GtkStyleProvider *provider, |
59 | const char *name); |
60 | GtkCssKeyframes * gtk_style_provider_get_keyframes (GtkStyleProvider *provider, |
61 | const char *name); |
62 | int gtk_style_provider_get_scale (GtkStyleProvider *provider); |
63 | void gtk_style_provider_lookup (GtkStyleProvider *provider, |
64 | const GtkCountingBloomFilter *filter, |
65 | GtkCssNode *node, |
66 | GtkCssLookup *lookup, |
67 | GtkCssChange *out_change); |
68 | |
69 | void gtk_style_provider_changed (GtkStyleProvider *provider); |
70 | |
71 | void gtk_style_provider_emit_error (GtkStyleProvider *provider, |
72 | GtkCssSection *section, |
73 | GError *error); |
74 | |
75 | G_END_DECLS |
76 | |
77 | #endif /* __GTK_STYLE_PROVIDER_PRIVATE_H__ */ |
78 | |