[pango/1.28] [gi] add out annotations to pango layout API



commit db63535d63311741405cab3f04cb22b560cd17f3
Author: John (J5) Palmieri <johnp redhat com>
Date:   Thu Feb 17 12:39:25 2011 -0500

    [gi] add out annotations to pango layout API
    
    https://bugzilla.gnome.org/show_bug.cgi?id=642593

 pango/pango-layout.c |   80 ++++++++++++++++++++++++++-----------------------
 1 files changed, 42 insertions(+), 38 deletions(-)
---
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 3beacfa..12f9dee 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -1245,7 +1245,8 @@ pango_layout_context_changed (PangoLayout *layout)
 /**
  * pango_layout_get_log_attrs:
  * @layout: a #PangoLayout
- * @attrs: location to store a pointer to an array of logical attributes
+ * @attrs: (out)(array length=n_attrs)(transfer container):
+ *         location to store a pointer to an array of logical attributes
  *         This value must be freed with g_free().
  * @n_attrs: location to store the number of the attributes in the
  *           array. (The stored value will be one more than the total number
@@ -1445,7 +1446,7 @@ pango_layout_get_line_readonly (PangoLayout *layout,
  * @trailing: an integer indicating the edge of the grapheme to retrieve
  *            the position of. If > 0, the trailing edge of the grapheme,
  *            if 0, the leading of the grapheme.
- * @x_pos: location to store the x_offset (in Pango unit)
+ * @x_pos: (out): location to store the x_offset (in Pango unit)
  *
  * Converts an index within a line to a X position.
  *
@@ -1596,10 +1597,10 @@ pango_layout_index_to_line_and_extents (PangoLayout     *layout,
  * @trailing:  an integer indicating the edge of the grapheme to retrieve the
  *             position of. If 0, the trailing edge of the grapheme, if > 0,
  *             the leading of the grapheme.
- * @line:      location to store resulting line index. (which will
- *             between 0 and pango_layout_get_line_count(layout) - 1)
- * @x_pos:     location to store resulting position within line
- *             (%PANGO_SCALE units per device unit)
+ * @line: (out): location to store resulting line index. (which will
+ *               between 0 and pango_layout_get_line_count(layout) - 1)
+ * @x_pos (out): location to store resulting position within line
+ *              (%PANGO_SCALE units per device unit)
  *
  * Converts from byte @index_ within the @layout to line and X position.
  * (X position is measured from the left edge of the line)
@@ -1655,7 +1656,7 @@ pango_layout_index_to_line_x (PangoLayout *layout,
  *                was at the leading edge.
  * @direction:    direction to move cursor. A negative
  *                value indicates motion to the left.
- * @new_index:    location to store the new cursor byte index. A value of -1
+ * @new_index: (out): location to store the new cursor byte index. A value of -1
  *                indicates that the cursor has been moved off the beginning
  *                of the layout. A value of %G_MAXINT indicates that
  *                the cursor has been moved off the end of the layout.
@@ -1836,8 +1837,8 @@ pango_layout_move_cursor_visually (PangoLayout *layout,
  *             from the left edge of the layout.
  * @y:         the Y offset (in Pango units)
  *             from the top edge of the layout
- * @index_:    location to store calculated byte index
- * @trailing:  location to store a integer indicating where
+ * @index_: (out):   location to store calculated byte index
+ * @trailing: (out): location to store a integer indicating where
  *             in the grapheme the user clicked. It will either
  *             be zero, or the number of characters in the
  *             grapheme. 0 represents the trailing edge of the grapheme.
@@ -1938,7 +1939,7 @@ pango_layout_xy_to_index (PangoLayout *layout,
  * pango_layout_index_to_pos:
  * @layout: a #PangoLayout
  * @index_: byte index within @layout
- * @pos: rectangle in which to store the position of the grapheme
+ * @pos: (out): rectangle in which to store the position of the grapheme
  *
  * Converts from an index within a #PangoLayout to the onscreen position
  * corresponding to the grapheme at that index, which is represented
@@ -2165,8 +2166,9 @@ pango_layout_line_get_char_direction (PangoLayoutLine *layout_line,
  * pango_layout_get_cursor_pos:
  * @layout: a #PangoLayout
  * @index_: the byte index of the cursor
- * @strong_pos: location to store the strong cursor position (may be %NULL)
- * @weak_pos: location to store the weak cursor position (may be %NULL)
+ * @strong_pos: (out): location to store the strong cursor position
+ *                     (may be %NULL)
+ * @weak_pos: (out): location to store the weak cursor position (may be %NULL)
  *
  * Given an index within a layout, determines the positions that of the
  * strong and weak cursors if the insertion point is at that
@@ -2586,10 +2588,11 @@ pango_layout_get_extents_internal (PangoLayout    *layout,
 /**
  * pango_layout_get_extents:
  * @layout:   a #PangoLayout
- * @ink_rect: rectangle used to store the extents of the layout as drawn
- *            or %NULL to indicate that the result is not needed.
- * @logical_rect: rectangle used to store the logical extents of the layout
-		 or %NULL to indicate that the result is not needed.
+ * @ink_rect: (out): rectangle used to store the extents of the layout as drawn
+ *                   or %NULL to indicate that the result is not needed.
+ * @logical_rect: (out):rectangle used to store the logical extents of the
+ *                      layout or %NULL to indicate that the result is not
+ *                      needed.
  *
  * Computes the logical and ink extents of @layout. Logical extents
  * are usually what you want for positioning things.  Note that both extents
@@ -2614,10 +2617,11 @@ pango_layout_get_extents (PangoLayout    *layout,
 /**
  * pango_layout_get_pixel_extents:
  * @layout:   a #PangoLayout
- * @ink_rect: rectangle used to store the extents of the layout as drawn
- *            or %NULL to indicate that the result is not needed.
- * @logical_rect: rectangle used to store the logical extents of the
- *              layout or %NULL to indicate that the result is not needed.
+ * @ink_rect: (out): rectangle used to store the extents of the layout as drawn
+ *                   or %NULL to indicate that the result is not needed.
+ * @logical_rect: (out): rectangle used to store the logical extents of the
+ *                       layout or %NULL to indicate that the result is not
+ *                       needed.
  *
  * Computes the logical and ink extents of @layout in device units.
  * This function just calls pango_layout_get_extents() followed by
@@ -2640,8 +2644,8 @@ pango_layout_get_pixel_extents (PangoLayout *layout,
 /**
  * pango_layout_get_size:
  * @layout: a #PangoLayout
- * @width: location to store the logical width, or %NULL
- * @height: location to store the logical height, or %NULL
+ * @width: (out): location to store the logical width, or %NULL
+ * @height: (out): location to store the logical height, or %NULL
  *
  * Determines the logical width and height of a #PangoLayout
  * in Pango units (device units scaled by %PANGO_SCALE). This
@@ -2665,8 +2669,8 @@ pango_layout_get_size (PangoLayout *layout,
 /**
  * pango_layout_get_pixel_size:
  * @layout: a #PangoLayout
- * @width: location to store the logical width, or %NULL
- * @height: location to store the logical height, or %NULL
+ * @width: (out): location to store the logical width, or %NULL
+ * @height: (out): location to store the logical height, or %NULL
  *
  * Determines the logical width and height of a #PangoLayout
  * in device units. (pango_layout_get_size() returns the width
@@ -3949,12 +3953,12 @@ pango_layout_line_get_type (void)
  * @line:      a #PangoLayoutLine
  * @x_pos:     the X offset (in Pango units)
  *             from the left edge of the line.
- * @index_:    location to store calculated byte index for
- *             the grapheme in which the user clicked.
- * @trailing:  location to store an integer indicating where
- *             in the grapheme the user clicked. It will either
- *             be zero, or the number of characters in the
- *             grapheme. 0 represents the leading edge of the grapheme.
+ * @index_: (out):   location to store calculated byte index for
+ *                   the grapheme in which the user clicked.
+ * @trailing: (out): location to store an integer indicating where
+ *                   in the grapheme the user clicked. It will either
+ *                   be zero, or the number of characters in the
+ *                   grapheme. 0 represents the leading edge of the grapheme.
  *
  * Converts from x offset to the byte index of the corresponding
  * character within the text of the layout. If @x_pos is outside the line,
@@ -4532,10 +4536,10 @@ pango_layout_run_get_extents (PangoLayoutRun *run,
 /**
  * pango_layout_line_get_extents:
  * @line:     a #PangoLayoutLine
- * @ink_rect: rectangle used to store the extents of the glyph string
- *            as drawn, or %NULL
- * @logical_rect: rectangle used to store the logical extents of the glyph
- *            string, or %NULL
+ * @ink_rect: (out): rectangle used to store the extents of the glyph string
+ *                   as drawn, or %NULL
+ * @logical_rect: (out):rectangle used to store the logical extents of the glyph
+ *                      string, or %NULL
  *
  * Computes the logical and ink extents of a layout line. See
  * pango_font_get_glyph_extents() for details about the interpretation
@@ -4680,10 +4684,10 @@ pango_layout_line_new (PangoLayout *layout)
 /**
  * pango_layout_line_get_pixel_extents:
  * @layout_line: a #PangoLayoutLine
- * @ink_rect:    rectangle used to store the extents of the glyph string
- *               as drawn, or %NULL
- * @logical_rect: rectangle used to store the logical extents of the glyph
- *               string, or %NULL
+ * @ink_rect: (out): rectangle used to store the extents of the glyph string
+ *                   as drawn, or %NULL
+ * @logical_rect: (out): rectangle used to store the logical extents of the
+ *                       glyph string, or %NULL
  *
  * Computes the logical and ink extents of @layout_line in device units.
  * This function just calls pango_layout_line_get_extents() followed by



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