[gtk+/wip/css: 93/167] stylecontext: Export _gtk_style_context_resolve_color()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/css: 93/167] stylecontext: Export _gtk_style_context_resolve_color()
- Date: Sun, 8 Jan 2012 21:30:41 +0000 (UTC)
commit 8bd10dfeef3e3fb95978f5d08d024253dd262ff3
Author: Benjamin Otte <otte redhat com>
Date: Mon Jan 2 15:43:53 2012 +0100
stylecontext: Export _gtk_style_context_resolve_color()
We'll need it soon.
gtk/gtkstylecontext.c | 20 ++++++++++++++++----
gtk/gtkstylecontextprivate.h | 4 ++++
2 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index bda25e0..a688c13 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -2849,6 +2849,21 @@ gtk_style_context_color_lookup_func (gpointer contextp,
return sym_color;
}
+gboolean
+_gtk_style_context_resolve_color (GtkStyleContext *context,
+ GtkSymbolicColor *color,
+ GdkRGBA *result)
+{
+ g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), FALSE);
+ g_return_val_if_fail (color != NULL, FALSE);
+ g_return_val_if_fail (result != NULL, FALSE);
+
+ return _gtk_symbolic_color_resolve_full (color,
+ gtk_style_context_color_lookup_func,
+ context,
+ result);
+}
+
/**
* gtk_style_context_lookup_color:
* @context: a #GtkStyleContext
@@ -2874,10 +2889,7 @@ gtk_style_context_lookup_color (GtkStyleContext *context,
if (sym_color == NULL)
return FALSE;
- return _gtk_symbolic_color_resolve_full (sym_color,
- gtk_style_context_color_lookup_func,
- context,
- color);
+ return _gtk_style_context_resolve_color (context, sym_color, color);
}
/**
diff --git a/gtk/gtkstylecontextprivate.h b/gtk/gtkstylecontextprivate.h
index 9796baf..69d6193 100644
--- a/gtk/gtkstylecontextprivate.h
+++ b/gtk/gtkstylecontextprivate.h
@@ -21,6 +21,7 @@
#define __GTK_STYLE_CONTEXT_PRIVATE_H__
#include "gtkstylecontext.h"
+#include "gtksymboliccolor.h"
G_BEGIN_DECLS
@@ -44,6 +45,9 @@ void _gtk_style_context_coalesce_animation_areas (GtkStyleContext *c
GtkWidget *widget);
gboolean _gtk_style_context_check_region_name (const gchar *str);
+gboolean _gtk_style_context_resolve_color (GtkStyleContext *context,
+ GtkSymbolicColor *color,
+ GdkRGBA *result);
void _gtk_style_context_get_cursor_color (GtkStyleContext *context,
GdkRGBA *primary_color,
GdkRGBA *secondary_color);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]