summaryrefslogtreecommitdiff
path: root/pango/fonts.c
diff options
context:
space:
mode:
authorEvan Nemerson <evan@nemerson.com>2014-05-30 19:21:11 -0700
committerEvan Nemerson <evan@nemerson.com>2014-10-16 13:09:34 -0700
commitfa6ded9b0d065634481d8ae4126fdea0b88e3558 (patch)
tree151efb6762bf467ada2ac104770fdefd293b7248 /pango/fonts.c
parentadb5a4e86b09b0935ec1dd71bf05ac41807c84a2 (diff)
downloadpango-fa6ded9b0d065634481d8ae4126fdea0b88e3558.tar.gz
Add many missing nullability annotations.
https://bugzilla.gnome.org/show_bug.cgi?id=731022
Diffstat (limited to 'pango/fonts.c')
-rw-r--r--pango/fonts.c49
1 files changed, 26 insertions, 23 deletions
diff --git a/pango/fonts.c b/pango/fonts.c
index d92a9033..52ef72df 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -164,9 +164,10 @@ pango_font_description_set_family_static (PangoFontDescription *desc,
* Gets the family name field of a font description. See
* pango_font_description_set_family().
*
- * Return value: the family name field for the font description, or
- * %NULL if not previously set. This has the same life-time
- * as the font description itself and should not be freed.
+ * Return value: (nullable): the family name field for the font
+ * description, or %NULL if not previously set. This
+ * has the same life-time as the font description itself
+ * and should not be freed.
**/
const char *
pango_font_description_get_family (const PangoFontDescription *desc)
@@ -669,13 +670,14 @@ pango_font_description_better_match (const PangoFontDescription *desc,
/**
* pango_font_description_copy:
- * @desc: a #PangoFontDescription, may be %NULL
+ * @desc: (nullable): a #PangoFontDescription, may be %NULL
*
* Make a copy of a #PangoFontDescription.
*
- * Return value: the newly allocated #PangoFontDescription, which should
- * be freed with pango_font_description_free(), or %NULL
- * if @desc was %NULL.
+ * Return value: (nullable): the newly allocated
+ * #PangoFontDescription, which should be freed with
+ * pango_font_description_free(), or %NULL if @desc was
+ * %NULL.
**/
PangoFontDescription *
pango_font_description_copy (const PangoFontDescription *desc)
@@ -700,16 +702,17 @@ pango_font_description_copy (const PangoFontDescription *desc)
/**
* pango_font_description_copy_static:
- * @desc: a #PangoFontDescription, may be %NULL
+ * @desc: (nullable): a #PangoFontDescription, may be %NULL
*
* Like pango_font_description_copy(), but only a shallow copy is made
* of the family name and other allocated fields. The result can only
* be used until @desc is modified or freed. This is meant to be used
* when the copy is only needed temporarily.
*
- * Return value: the newly allocated #PangoFontDescription, which should
- * be freed with pango_font_description_free(), or %NULL
- * if @desc was %NULL.
+ * Return value: (nullable): the newly allocated
+ * #PangoFontDescription, which should be freed with
+ * pango_font_description_free(), or %NULL if @desc was
+ * %NULL.
**/
PangoFontDescription *
pango_font_description_copy_static (const PangoFontDescription *desc)
@@ -810,7 +813,7 @@ pango_font_description_hash (const PangoFontDescription *desc)
/**
* pango_font_description_free:
- * @desc: a #PangoFontDescription, may be %NULL
+ * @desc: (nullable): a #PangoFontDescription, may be %NULL
*
* Frees a font description.
**/
@@ -1564,7 +1567,7 @@ pango_font_find_shaper (PangoFont *font,
/**
* pango_font_get_glyph_extents:
- * @font: a #PangoFont
+ * @font: (nullable): a #PangoFont
* @glyph: the glyph index
* @ink_rect: (out) (allow-none): rectangle used to store the extents of the glyph
* as drawn or %NULL to indicate that the result is not needed.
@@ -1612,7 +1615,7 @@ pango_font_get_glyph_extents (PangoFont *font,
/**
* pango_font_get_metrics:
- * @font: a #PangoFont
+ * @font: (nullable): a #PangoFont
* @language: (allow-none): language tag used to determine which script to get the metrics
* for, or %NULL to indicate to get the metrics for the entire font.
*
@@ -1652,7 +1655,7 @@ pango_font_get_metrics (PangoFont *font,
/**
* pango_font_get_font_map:
- * @font: a #PangoFont, or %NULL
+ * @font: (nullable): a #PangoFont, or %NULL
*
* Gets the font map for which the font was created.
*
@@ -1664,8 +1667,8 @@ pango_font_get_metrics (PangoFont *font,
* alive. In most uses this is not an issue as a #PangoContext holds
* a reference to the font map.
*
- * Return value: (transfer none): the #PangoFontMap for the font, or %NULL
- * if @font is %NULL.
+ * Return value: (transfer none) (nullable): the #PangoFontMap for the
+ * font, or %NULL if @font is %NULL.
*
* Since: 1.10
**/
@@ -1706,11 +1709,11 @@ pango_font_metrics_new (void)
/**
* pango_font_metrics_ref:
- * @metrics: a #PangoFontMetrics structure, may be %NULL
+ * @metrics: (nullable): a #PangoFontMetrics structure, may be %NULL
*
* Increase the reference count of a font metrics structure by one.
*
- * Return value: @metrics
+ * Return value: (nullable): @metrics
**/
PangoFontMetrics *
pango_font_metrics_ref (PangoFontMetrics *metrics)
@@ -1725,7 +1728,7 @@ pango_font_metrics_ref (PangoFontMetrics *metrics)
/**
* pango_font_metrics_unref:
- * @metrics: a #PangoFontMetrics structure, may be %NULL
+ * @metrics: (nullable): a #PangoFontMetrics structure, may be %NULL
*
* Decrease the reference count of a font metrics structure by one. If
* the result is zero, frees the structure and any associated
@@ -2073,9 +2076,9 @@ pango_font_face_get_face_name (PangoFontFace *face)
/**
* pango_font_face_list_sizes:
* @face: a #PangoFontFace.
- * @sizes: (out) (array length=n_sizes): location to store a pointer
- * to an array of int. This array should be freed with
- * g_free().
+ * @sizes: (out) (array length=n_sizes) (nullable) (optional):
+ * location to store a pointer to an array of int. This array
+ * should be freed with g_free().
* @n_sizes: location to store the number of elements in @sizes
*
* List the available sizes for a font. This is only applicable to bitmap