From 457665300674a1df80b3c8f5cfa690c3a37a828e Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 2 Jan 2012 15:43:53 +0100 Subject: [PATCH] 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 bda25e05a6..a688c1374b 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 9796bafc66..69d619330a 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);