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.
22 #include "gtkprivate.h"
23 #include "gtkstyleprovider.h"
28 static void gtk_style_provider_iface_init (gpointer g_iface);
31 gtk_style_provider_get_type (void)
33 static GType style_provider_type = 0;
35 if (!style_provider_type)
36 style_provider_type = g_type_register_static_simple (G_TYPE_INTERFACE,
37 I_("GtkStyleProvider"),
38 sizeof (GtkStyleProviderIface),
39 (GClassInitFunc) gtk_style_provider_iface_init,
41 return style_provider_type;
45 gtk_style_provider_iface_init (gpointer g_iface)
50 gtk_style_provider_get_style (GtkStyleProvider *provider,
53 GtkStyleProviderIface *iface;
55 g_return_val_if_fail (GTK_IS_STYLE_PROVIDER (provider), NULL);
57 iface = GTK_STYLE_PROVIDER_GET_IFACE (provider);
59 if (!iface->get_style)
62 return iface->get_style (provider, path);
66 gtk_style_provider_get_style_property (GtkStyleProvider *provider,
67 GtkWidgetPath *widget_path,
68 const gchar *property_name,
71 GtkStyleProviderIface *iface;
73 g_return_val_if_fail (GTK_IS_STYLE_PROVIDER (provider), FALSE);
74 g_return_val_if_fail (widget_path != NULL, FALSE);
75 g_return_val_if_fail (property_name != NULL, FALSE);
76 g_return_val_if_fail (value != NULL, FALSE);
78 iface = GTK_STYLE_PROVIDER_GET_IFACE (provider);
80 if (!iface->get_style_property)
83 return iface->get_style_property (provider, widget_path, property_name, value);
87 #define __GTK_STYLE_PROVIDER_C__
88 #include "gtkaliasdef.c"