From 0486f5bbc023c9d0c684bb5f3330f244a10b89ff Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Sat, 27 Mar 2010 20:19:53 +0100 Subject: [PATCH] GtkStyleContext: Add gtk_render_focus(). --- gtk/gtkstylecontext.c | 21 +++++++++++++++++++++ gtk/gtkstylecontext.h | 6 ++++++ 2 files changed, 27 insertions(+) diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index bce74a7234..3c5cb88db5 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -714,5 +714,26 @@ gtk_render_expander (GtkStyleContext *context, engine_class->render_expander (priv->theming_engine, cr, x, y, width, height); } +void +gtk_render_focus (GtkStyleContext *context, + cairo_t *cr, + gdouble x, + gdouble y, + gdouble width, + gdouble height) +{ + GtkStyleContextPrivate *priv; + GtkThemingEngineClass *engine_class; + + g_return_if_fail (GTK_IS_STYLE_CONTEXT (context)); + g_return_if_fail (cr != NULL); + + priv = GTK_STYLE_CONTEXT_GET_PRIVATE (context); + engine_class = GTK_THEMING_ENGINE_GET_CLASS (priv->theming_engine); + + _gtk_theming_engine_set_context (priv->theming_engine, context); + engine_class->render_focus (priv->theming_engine, cr, x, y, width, height); +} + #define __GTK_STYLE_CONTEXT_C__ #include "gtkaliasdef.c" diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h index a54a431a01..416a0e7f9d 100644 --- a/gtk/gtkstylecontext.h +++ b/gtk/gtkstylecontext.h @@ -139,6 +139,12 @@ void gtk_render_expander (GtkStyleContext *context, gdouble y, gdouble width, gdouble height); +void gtk_render_focus (GtkStyleContext *context, + cairo_t *cr, + gdouble x, + gdouble y, + gdouble width, + gdouble height); G_END_DECLS