[gtk+/gtk-style-context: 96/191] GtkStyleProvider: Add method to get widget style properties.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 96/191] GtkStyleProvider: Add method to get widget style properties.
- Date: Tue, 17 Aug 2010 13:56:16 +0000 (UTC)
commit 76d24a15114aca60777788ba4448ed71afbdb759
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Jun 18 16:58:16 2010 +0200
GtkStyleProvider: Add method to get widget style properties.
gtk/gtkstyleprovider.c | 23 ++++++++++++++++++++++-
gtk/gtkstyleprovider.h | 16 +++++++++-------
2 files changed, 31 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkstyleprovider.c b/gtk/gtkstyleprovider.c
index 606f4a1..e67d447 100644
--- a/gtk/gtkstyleprovider.c
+++ b/gtk/gtkstyleprovider.c
@@ -44,7 +44,6 @@ gtk_style_provider_get_type (void)
static void
gtk_style_provider_iface_init (gpointer g_iface)
{
- GType iface_type = G_TYPE_FROM_INTERFACE (g_iface);
}
GtkStyleSet *
@@ -63,5 +62,27 @@ gtk_style_provider_get_style (GtkStyleProvider *provider,
return iface->get_style (provider, path);
}
+gboolean
+gtk_style_provider_get_style_property (GtkStyleProvider *provider,
+ GtkWidgetPath *widget_path,
+ const gchar *property_name,
+ GValue *value)
+{
+ GtkStyleProviderIface *iface;
+
+ g_return_val_if_fail (GTK_IS_STYLE_PROVIDER (provider), FALSE);
+ g_return_val_if_fail (widget_path != NULL, FALSE);
+ g_return_val_if_fail (property_name != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ iface = GTK_STYLE_PROVIDER_GET_IFACE (provider);
+
+ if (!iface->get_style_property)
+ return FALSE;
+
+ return iface->get_style_property (provider, widget_path, property_name, value);
+}
+
+
#define __GTK_STYLE_PROVIDER_C__
#include "gtkaliasdef.c"
diff --git a/gtk/gtkstyleprovider.h b/gtk/gtkstyleprovider.h
index 35a7e24..5fc30ed 100644
--- a/gtk/gtkstyleprovider.h
+++ b/gtk/gtkstyleprovider.h
@@ -40,19 +40,17 @@ G_BEGIN_DECLS
typedef struct GtkStyleProviderIface GtkStyleProviderIface;
typedef struct GtkStyleProvider GtkStyleProvider; /* dummy typedef */
-typedef enum {
- GTK_SELECTOR_TYPE_PATH,
- GTK_SELECTOR_TYPE_NAME,
- GTK_SELECTOR_TYPE_CLASS_PATH,
- GTK_SELECTOR_TYPE_CLASS_NAME
-} GtkSelectorType;
-
struct GtkStyleProviderIface
{
GTypeInterface g_iface;
GtkStyleSet * (* get_style) (GtkStyleProvider *provider,
GtkWidgetPath *path);
+
+ gboolean (* get_style_property) (GtkStyleProvider *provider,
+ GtkWidgetPath *path,
+ const gchar *property_name,
+ GValue *value);
};
GType gtk_style_provider_get_type (void) G_GNUC_CONST;
@@ -60,6 +58,10 @@ GType gtk_style_provider_get_type (void) G_GNUC_CONST;
GtkStyleSet *gtk_style_provider_get_style (GtkStyleProvider *provider,
GtkWidgetPath *path);
+gboolean gtk_style_provider_get_style_property (GtkStyleProvider *provider,
+ GtkWidgetPath *path,
+ const gchar *property_name,
+ GValue *value);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]