[gtksourceview] gir: fix out params for text measuring in GtkSourceGutterRendererText



commit b37dd94e168c2fc4bcad3f4a0a6df5436f9ad2eb
Author: Christian Hergert <christian hergert me>
Date:   Thu Jun 25 12:15:32 2015 -0700

    gir: fix out params for text measuring in GtkSourceGutterRendererText
    
    These weren't available from Python because they were not marked as out
    parameters. Fixes "renderer_text.measure(text)" to return (width, height).
    
    Also fixes markup variant.

 gtksourceview/gtksourcegutterrenderertext.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/gtksourcegutterrenderertext.c b/gtksourceview/gtksourcegutterrenderertext.c
index dcb313e..69c0863 100644
--- a/gtksourceview/gtksourcegutterrenderertext.c
+++ b/gtksourceview/gtksourcegutterrenderertext.c
@@ -282,6 +282,16 @@ measure_text (GtkSourceGutterRendererText *renderer,
        g_object_unref (layout);
 }
 
+/**
+ * gtk_source_gutter_renderer_text_measure:
+ * @renderer: A #GtkSourceGutterRendererText
+ * @text: the text to measure
+ * @width: (out): The width of the text in pixels
+ * @height: (out): The height of the text in pixels
+ *
+ * Measures the text provided using the pango layout used by the
+ * #GtkSourceGutterRendererText.
+ */
 void
 gtk_source_gutter_renderer_text_measure (GtkSourceGutterRendererText *renderer,
                                          const gchar                 *text,
@@ -294,6 +304,16 @@ gtk_source_gutter_renderer_text_measure (GtkSourceGutterRendererText *renderer,
        measure_text (renderer, NULL, text, width, height);
 }
 
+/**
+ * gtk_source_gutter_renderer_text_measure_markup:
+ * @renderer: A #GtkSourceGutterRendererText.
+ * @markup: the pango markup to measure
+ * @width: (out): The width of the text in pixels
+ * @height: (out): The height of the text in pixels
+ *
+ * Measures the pango markup provided using the pango layout used by the
+ * #GtkSourceGutterRendererText.
+ */
 void
 gtk_source_gutter_renderer_text_measure_markup (GtkSourceGutterRendererText *renderer,
                                                 const gchar                 *markup,


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