diff options
Diffstat (limited to 'pango/pango-color.c')
-rw-r--r-- | pango/pango-color.c | 88 |
1 files changed, 46 insertions, 42 deletions
diff --git a/pango/pango-color.c b/pango/pango-color.c index f616e1f0..b6907035 100644 --- a/pango/pango-color.c +++ b/pango/pango-color.c @@ -34,18 +34,18 @@ G_DEFINE_BOXED_TYPE (PangoColor, pango_color, /** * pango_color_copy: - * @src: (nullable): color to copy, may be %NULL + * @src: (nullable): color to copy * * Creates a copy of @src. * - * The copy should be freed with pango_color_free(). Primarily - * used by language bindings, not that useful otherwise (since - * colors can just be copied by assignment in C). + * The copy should be freed with [method@Pango.Color.free]. + * Primarily used by language bindings, not that useful + * otherwise (since colors can just be copied by assignment + * in C). * - * Return value: (nullable): the newly allocated `PangoColor`, which - * should be freed with [method@Pango.Color.free], or %NULL if - * @src was %NULL. - **/ + * Return value: (nullable): the newly allocated `PangoColor`, + * which should be freed with [method@Pango.Color.free] + */ PangoColor* pango_color_copy (const PangoColor *src) { @@ -63,10 +63,10 @@ pango_color_copy (const PangoColor *src) /** * pango_color_free: - * @color: (nullable): an allocated #PangoColor, may be %NULL + * @color: (nullable): an allocated `PangoColor` * - * Frees a color allocated by pango_color_copy(). - **/ + * Frees a color allocated by [ctor@Pango.copy]. + */ void pango_color_free (PangoColor *color) { @@ -78,18 +78,19 @@ pango_color_free (PangoColor *color) /** * pango_color_to_string: - * @color: a #PangoColor + * @color: a `PangoColor` * * Returns a textual specification of @color. * - * The string is in the hexadecimal form `#rrrrggggbbbb`, where - * `r`, `g` and `b` are hex digits representing the red, green, - * and blue components respectively. + * The string is in the hexadecimal form `#rrrrggggbbbb`, + * where `r`, `g` and `b` are hex digits representing the + * red, green, and blue components respectively. * - * Return value: a newly-allocated text string that must be freed with g_free(). + * Return value: a newly-allocated text string that must + * be freed with g_free(). * * Since: 1.16 - **/ + */ gchar * pango_color_to_string (const PangoColor *color) { @@ -211,27 +212,29 @@ hex (const char *spec, /** * pango_color_parse_with_alpha: - * @color: (nullable): a `PangoColor` structure in which to store the - * result, or %NULL - * @alpha: (out) (optional): return location for alpha, or %NULL + * @color: (nullable): a `PangoColor` structure in which + * to store the result + * @alpha: (out) (optional): return location for alpha * @spec: a string specifying the new color * * Fill in the fields of a color from a string specification. * - * The string can - * either one of a large set of standard names. (Taken from the CSS Color - * [specification](https://www.w3.org/TR/css-color-4/#named-colors), - * or it can be a hexadecimal value in the form `#rgb`, `#rrggbb`, `#rrrgggbbb` - * or `#rrrrggggbbbb` where `r`, `g` and `b` are hex digits of the red, green, - * and blue components of the color, respectively. (White in the four - * forms is `#fff`, `#ffffff`, `#fffffffff` and `#ffffffffffff`.) + * The string can either one of a large set of standard names. + * (Taken from the CSS Color [specification](https://www.w3.org/TR/css-color-4/#named-colors), + * or it can be a hexadecimal value in the form `#rgb`, + * `#rrggbb`, `#rrrgggbbb` or `#rrrrggggbbbb` where `r`, `g` + * and `b` are hex digits of the red, green, and blue components + * of the color, respectively. (White in the four forms is + * `#fff`, `#ffffff`, `#fffffffff` and `#ffffffffffff`.) * * Additionally, parse strings of the form `#rgba`, `#rrggbbaa`, - * `#rrrrggggbbbbaaaa`, if @alpha is not %NULL, and set @alpha to the value - * specified by the hex digits for `a`. If no alpha component is found - * in @spec, @alpha is set to 0xffff (for a solid color). + * `#rrrrggggbbbbaaaa`, if @alpha is not %NULL, and set @alpha + * to the value specified by the hex digits for `a`. If no alpha + * component is found in @spec, @alpha is set to 0xffff (for a + * solid color). * - * Return value: %TRUE if parsing of the specifier succeeded, otherwise false. + * Return value: %TRUE if parsing of the specifier succeeded, + * otherwise %FALSE * * Since: 1.46 */ @@ -320,22 +323,23 @@ pango_color_parse_with_alpha (PangoColor *color, /** * pango_color_parse: - * @color: (nullable): a `PangoColor` structure in which to store the - * result, or %NULL + * @color: (nullable): a `PangoColor` structure in which + * to store the result * @spec: a string specifying the new color * * Fill in the fields of a color from a string specification. * - * The string can either - * one of a large set of standard names. (Taken from the CSS Color - * [specification](https://www.w3.org/TR/css-color-4/#named-colors), or it can be - * a value in the form `#rgb`, `#rrggbb`, `#rrrgggbbb` or `#rrrrggggbbbb`, where - * `r`, `g` and `b` are hex digits of the red, green, and blue components of the - * color, respectively. (White in the four forms is `#fff`, `#ffffff`, `#fffffffff` - * and `#ffffffffffff`.) + * The string can either one of a large set of standard names. + * (Taken from the CSS Color [specification](https://www.w3.org/TR/css-color-4/#named-colors), + * or it can be a value in the form `#rgb`, `#rrggbb`, + * `#rrrgggbbb` or `#rrrrggggbbbb`, where `r`, `g` and `b` + * are hex digits of the red, green, and blue components + * of the color, respectively. (White in the four forms is + * `#fff`, `#ffffff`, `#fffffffff` and `#ffffffffffff`.) * - * Return value: %TRUE if parsing of the specifier succeeded, otherwise false. - **/ + * Return value: %TRUE if parsing of the specifier succeeded, + * otherwise %FALSE + */ gboolean pango_color_parse (PangoColor *color, const char *spec) |