gir: Add missing annotations

Otherwise we won't be able to generate proper API for our bindings
This commit is contained in:
Niels De Graef 2020-05-04 02:10:55 +02:00 committed by Niels De Graef
parent cf41d1fdf8
commit 9c9e310a67
9 changed files with 42 additions and 33 deletions

View file

@ -326,7 +326,7 @@ gimp_image_list_vectors (GimpImage *image)
/** /**
* gimp_image_get_colormap: * gimp_image_get_colormap:
* @image: The image. * @image: The image.
* @num_colors: Returns the number of colors in the colormap array. * @num_colors: (out): Returns the number of colors in the colormap array.
* *
* Returns the image's colormap * Returns the image's colormap
* *
@ -334,7 +334,7 @@ gimp_image_list_vectors (GimpImage *image)
* well as the number of colors contained in the colormap. If the image * well as the number of colors contained in the colormap. If the image
* is not of base type INDEXED, this pointer will be NULL. * is not of base type INDEXED, this pointer will be NULL.
* *
* Returns: The image's colormap. * Returns: (array): The image's colormap.
*/ */
guchar * guchar *
gimp_image_get_colormap (GimpImage *image, gimp_image_get_colormap (GimpImage *image,
@ -354,7 +354,7 @@ gimp_image_get_colormap (GimpImage *image,
/** /**
* gimp_image_set_colormap: * gimp_image_set_colormap:
* @image: The image. * @image: The image.
* @colormap: The new colormap values. * @colormap: (array): The new colormap values.
* @num_colors: Number of colors in the colormap array. * @num_colors: Number of colors in the colormap array.
* *
* Sets the entries in the image's colormap. * Sets the entries in the image's colormap.

View file

@ -109,10 +109,10 @@ gimp_cmyk_set_uchar (GimpCMYK *cmyk,
/** /**
* gimp_cmyk_get_uchar: * gimp_cmyk_get_uchar:
* @cmyk: A #GimpCMYK structure which will hold the specified CMYK value. * @cmyk: A #GimpCMYK structure which will hold the specified CMYK value.
* @cyan: The Cyan channel of the CMYK value * @cyan: (out) (optional): The Cyan channel of the CMYK value
* @magenta: The Magenta channel * @magenta: (out) (optional): The Magenta channel
* @yellow: The Yellow channel * @yellow: (out) (optional): The Yellow channel
* @black: The blacK channel * @black: (out) (optional): The blacK channel
* *
* Retrieve individual channel values from a #GimpCMYK structure. Channel * Retrieve individual channel values from a #GimpCMYK structure. Channel
* values are pointers to unsigned chars in the range 0 to 255. * values are pointers to unsigned chars in the range 0 to 255.
@ -192,14 +192,15 @@ gimp_cmyka_set_uchar (GimpCMYK *cmyka,
cmyka->k = (gdouble) black / 255.0; cmyka->k = (gdouble) black / 255.0;
cmyka->a = (gdouble) alpha / 255.0; cmyka->a = (gdouble) alpha / 255.0;
} }
/** /**
* gimp_cmyka_get_uchar: * gimp_cmyka_get_uchar:
* @cmyka: A #GimpCMYK structure which will hold the specified CMYKA value. * @cmyka: A #GimpCMYK structure which will hold the specified CMYKA value.
* @cyan: The Cyan channel of the CMYK value * @cyan: (out) (optional): The Cyan channel of the CMYK value
* @magenta: The Magenta channel * @magenta: (out) (optional): The Magenta channel
* @yellow: The Yellow channel * @yellow: (out) (optional): The Yellow channel
* @black: The blacK channel * @black: (out) (optional): The blacK channel
* @alpha: The Alpha channel * @alpha: (out) (optional): The Alpha channel
* *
* Retrieve individual channel values from a #GimpCMYK structure. * Retrieve individual channel values from a #GimpCMYK structure.
* Channel values are pointers to unsigned chars in the range 0 to 255. * Channel values are pointers to unsigned chars in the range 0 to 255.

View file

@ -75,13 +75,13 @@ gimp_color_managed_default_init (GimpColorManagedInterface *iface)
/** /**
* gimp_color_managed_get_icc_profile: * gimp_color_managed_get_icc_profile:
* @managed: an object the implements the #GimpColorManaged interface * @managed: an object the implements the #GimpColorManaged interface
* @len: return location for the number of bytes in the profile data * @len: (out): return location for the number of bytes in the profile data
* *
* Returns: A pointer to a blob of data that represents an ICC * Returns: (array length=len): A blob of data that represents an ICC color
* color profile. * profile.
* *
* Since: 2.4 * Since: 2.4
**/ */
const guint8 * const guint8 *
gimp_color_managed_get_icc_profile (GimpColorManaged *managed, gimp_color_managed_get_icc_profile (GimpColorManaged *managed,
gsize *len) gsize *len)

View file

@ -48,7 +48,16 @@ struct _GimpColorManagedInterface
{ {
GTypeInterface base_iface; GTypeInterface base_iface;
/* virtual functions */ /**
* GimpColorManagedInterface::get_icc_profile:
* @managed: an object the implements the #GimpColorManaged interface
* @len: (out): return location for the number of bytes in the profile data
*
* Returns: (array length=len): A blob of data that represents an ICC color
* profile.
*
* Since: 2.4
*/
const guint8 * (* get_icc_profile) (GimpColorManaged *managed, const guint8 * (* get_icc_profile) (GimpColorManaged *managed,
gsize *len); gsize *len);

View file

@ -265,7 +265,7 @@ gimp_color_profile_new_from_file (GFile *file,
/** /**
* gimp_color_profile_new_from_icc_profile: * gimp_color_profile_new_from_icc_profile:
* @data: pointer to memory containing an ICC profile * @data: (array length=length): The memory containing an ICC profile
* @length: length of the profile in memory, in bytes * @length: length of the profile in memory, in bytes
* @error: return location for #GError * @error: return location for #GError
* *
@ -397,12 +397,12 @@ gimp_color_profile_save_to_file (GimpColorProfile *profile,
/** /**
* gimp_color_profile_get_icc_profile: * gimp_color_profile_get_icc_profile:
* @profile: a #GimpColorProfile * @profile: a #GimpColorProfile
* @length: return location for the number of bytes * @length: (out): return location for the number of bytes
* *
* This function returns @profile as ICC profile data. The returned * This function returns @profile as ICC profile data. The returned
* memory belongs to @profile and must not be modified or freed. * memory belongs to @profile and must not be modified or freed.
* *
* Returns: a pointer to the IIC profile data. * Returns: (array length=length): a pointer to the IIC profile data.
* *
* Since: 2.10 * Since: 2.10
**/ **/

View file

@ -118,12 +118,12 @@ gimp_pixbuf_create_buffer (GdkPixbuf *pixbuf)
/** /**
* gimp_pixbuf_get_icc_profile: * gimp_pixbuf_get_icc_profile:
* @pixbuf: a #GdkPixbuf * @pixbuf: a #GdkPixbuf
* @length: return location for the ICC profile's length * @length: (out): return location for the ICC profile's length
* *
* Returns the ICC profile attached to the @pixbuf, or %NULL if there * Returns the ICC profile attached to the @pixbuf, or %NULL if there
* is none. * is none.
* *
* Returns: (nullable): The ICC profile data, or %NULL. * Returns: (array length=length) (nullable): The ICC profile data, or %NULL.
* The value should be freed with g_free(). * The value should be freed with g_free().
* *
* Since: 2.10 * Since: 2.10

View file

@ -54,7 +54,7 @@ static void gimp_config_value_free (GValue *value);
* gimp_config_type_register: * gimp_config_type_register:
* @parent_type: type from which this type will be derived * @parent_type: type from which this type will be derived
* @type_name: string used as the name of the new type * @type_name: string used as the name of the new type
* @pspecs: array of #GParamSpec to install as properties on the new type * @pspecs: (array length=n_pspecs): array of #GParamSpec to install as properties on the new type
* @n_pspecs: the number of param specs in @pspecs * @n_pspecs: the number of param specs in @pspecs
* *
* This function is a fancy wrapper around g_type_register_static(). * This function is a fancy wrapper around g_type_register_static().

View file

@ -292,8 +292,8 @@ gimp_matrix2_invert (GimpMatrix2 *matrix)
* @matrix: The transformation matrix. * @matrix: The transformation matrix.
* @x: The source X coordinate. * @x: The source X coordinate.
* @y: The source Y coordinate. * @y: The source Y coordinate.
* @newx: The transformed X coordinate. * @newx: (out): The transformed X coordinate.
* @newy: The transformed Y coordinate. * @newy: (out): The transformed Y coordinate.
* *
* Transforms a point in 2D as specified by the transformation matrix. * Transforms a point in 2D as specified by the transformation matrix.
* *
@ -971,10 +971,9 @@ gimp_matrix4_mult (const GimpMatrix4 *matrix1,
/** /**
* gimp_matrix4_to_deg: * gimp_matrix4_to_deg:
* @matrix: * @matrix:
* @a: * @a: (out):
* @b: * @b: (out):
* @c: * @c: (out):
*
* *
**/ **/
void void
@ -994,9 +993,9 @@ gimp_matrix4_to_deg (const GimpMatrix4 *matrix,
* @x: The source X coordinate. * @x: The source X coordinate.
* @y: The source Y coordinate. * @y: The source Y coordinate.
* @z: The source Z coordinate. * @z: The source Z coordinate.
* @newx: The transformed X coordinate. * @newx: (out): The transformed X coordinate.
* @newy: The transformed Y coordinate. * @newy: (out): The transformed Y coordinate.
* @newz: The transformed Z coordinate. * @newz: (out): The transformed Z coordinate.
* *
* Transforms a point in 3D as specified by the transformation matrix. * Transforms a point in 3D as specified by the transformation matrix.
* *

View file

@ -1752,7 +1752,7 @@ gimp_preview_area_set_offsets (GimpPreviewArea *area,
/** /**
* gimp_preview_area_set_colormap: * gimp_preview_area_set_colormap:
* @area: a #GimpPreviewArea * @area: a #GimpPreviewArea
* @colormap: a #guchar buffer that contains the colormap * @colormap: (array): a #guchar buffer that contains the colormap
* @num_colors: the number of colors in the colormap * @num_colors: the number of colors in the colormap
* *
* Sets the colormap for the #GimpPreviewArea widget. You need to * Sets the colormap for the #GimpPreviewArea widget. You need to