[gtk+/gtk-style-context: 44/206] GtkStyleContext: Add gtk_render_layout().



commit 0b8c23f48fe5413cf414a85a1647865feb7d73e6
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Mar 27 20:22:44 2010 +0100

    GtkStyleContext: Add gtk_render_layout().

 gtk/gtkstylecontext.c |   20 ++++++++++++++++++++
 gtk/gtkstylecontext.h |    5 +++++
 2 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 3c5cb88..583a19b 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -735,5 +735,25 @@ gtk_render_focus (GtkStyleContext *context,
   engine_class->render_focus (priv->theming_engine, cr, x, y, width, height);
 }
 
+void
+gtk_render_layout (GtkStyleContext *context,
+                   cairo_t         *cr,
+                   gdouble          x,
+                   gdouble          y,
+                   PangoLayout     *layout)
+{
+  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_layout (priv->theming_engine, cr, x, y, layout);
+}
+
 #define __GTK_STYLE_CONTEXT_C__
 #include "gtkaliasdef.c"
diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h
index 416a0e7..0bf5e1c 100644
--- a/gtk/gtkstylecontext.h
+++ b/gtk/gtkstylecontext.h
@@ -145,6 +145,11 @@ void gtk_render_focus    (GtkStyleContext *context,
                           gdouble          y,
                           gdouble          width,
                           gdouble          height);
+void gtk_render_layout   (GtkStyleContext *context,
+                          cairo_t         *cr,
+                          gdouble          x,
+                          gdouble          y,
+                          PangoLayout     *layout);
 
 G_END_DECLS
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]