1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 2011 Benjamin Otte <otte@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, see <http://www.gnu.org/licenses/>.
20 #include "gtkstyleproviderprivate.h"
21 #include "gtkstyleprovider.h"
23 G_DEFINE_INTERFACE (GtkStyleProviderPrivate, _gtk_style_provider_private, GTK_TYPE_STYLE_PROVIDER)
26 _gtk_style_provider_private_default_init (GtkStyleProviderPrivateInterface *iface)
31 _gtk_style_provider_private_get_color (GtkStyleProviderPrivate *provider,
34 GtkStyleProviderPrivateInterface *iface;
36 g_return_val_if_fail (GTK_IS_STYLE_PROVIDER_PRIVATE (provider), NULL);
38 iface = GTK_STYLE_PROVIDER_PRIVATE_GET_INTERFACE (provider);
40 if (!iface->get_color)
43 return iface->get_color (provider, name);
47 _gtk_style_provider_private_lookup (GtkStyleProviderPrivate *provider,
52 GtkStyleProviderPrivateInterface *iface;
54 g_return_if_fail (GTK_IS_STYLE_PROVIDER_PRIVATE (provider));
55 g_return_if_fail (path != NULL);
56 g_return_if_fail (lookup != NULL);
58 iface = GTK_STYLE_PROVIDER_PRIVATE_GET_INTERFACE (provider);
63 iface->lookup (provider, path, state, lookup);