stylecontext: Export _gtk_style_context_resolve_color()

We'll need it soon.
This commit is contained in:
Benjamin Otte 2012-01-02 15:43:53 +01:00
parent f2dc63cc6a
commit 4576653006
2 changed files with 20 additions and 4 deletions

View File

@ -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);
}
/**

View File

@ -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);