Commit c12c031f authored by Michael Natterer's avatar Michael Natterer 😴

pdb, libgimp*: add (out caller-allocates) to all GimpRGB* return values

parent bdac38a8
Pipeline #100556 passed with stages
in 32 minutes and 24 seconds
......@@ -369,7 +369,7 @@ gimp_channel_set_opacity (gint32 channel_ID,
/**
* gimp_channel_get_color:
* @channel_ID: The channel.
* @color: (out): The channel compositing color.
* @color: (out caller-allocates): The channel compositing color.
*
* Get the compositing color of the specified channel.
*
......
......@@ -322,7 +322,7 @@ gimp_context_set_stroke_method (GimpStrokeMethod stroke_method)
/**
* gimp_context_get_foreground:
* @foreground: (out): The foreground color.
* @foreground: (out caller-allocates): The foreground color.
*
* Get the current GIMP foreground color.
*
......@@ -395,7 +395,7 @@ gimp_context_set_foreground (const GimpRGB *foreground)
/**
* gimp_context_get_background:
* @background: (out): The background color.
* @background: (out caller-allocates): The background color.
*
* Get the current GIMP background color.
*
......
......@@ -377,7 +377,7 @@ gimp_gradient_get_custom_samples (const gchar *name,
* gimp_gradient_segment_get_left_color:
* @name: The gradient name.
* @segment: The index of the segment within the gradient.
* @color: (out): The return color.
* @color: (out caller-allocates): The return color.
* @opacity: (out): The opacity of the endpoint.
*
* Retrieves the left endpoint color of the specified segment
......@@ -475,7 +475,7 @@ gimp_gradient_segment_set_left_color (const gchar *name,
* gimp_gradient_segment_get_right_color:
* @name: The gradient name.
* @segment: The index of the segment within the gradient.
* @color: (out): The return color.
* @color: (out caller-allocates): The return color.
* @opacity: (out): The opacity of the endpoint.
*
* Retrieves the right endpoint color of the specified segment
......
......@@ -738,7 +738,7 @@ gimp_image_floating_sel_attached_to (gint32 image_ID)
* @sample_merged: Use the composite image, not the drawable.
* @sample_average: Average the color of all the pixels in a specified radius.
* @average_radius: The radius of pixels to average.
* @color: (out): The return color.
* @color: (out caller-allocates): The return color.
*
* Determine the color at the given drawable coordinates
*
......
......@@ -219,7 +219,7 @@ gimp_image_grid_set_offset (gint32 image_ID,
/**
* gimp_image_grid_get_foreground_color:
* @image_ID: The image.
* @fgcolor: (out): The image's grid foreground color.
* @fgcolor: (out caller-allocates): The image's grid foreground color.
*
* Sets the foreground color of an image's grid.
*
......@@ -296,7 +296,7 @@ gimp_image_grid_set_foreground_color (gint32 image_ID,
/**
* gimp_image_grid_get_background_color:
* @image_ID: The image.
* @bgcolor: (out): The image's grid background color.
* @bgcolor: (out caller-allocates): The image's grid background color.
*
* Sets the background color of an image's grid.
*
......
......@@ -466,7 +466,7 @@ gimp_palette_delete_entry (const gchar *name,
* gimp_palette_entry_get_color:
* @name: The palette name.
* @entry_num: The entry to retrieve.
* @color: (out): The color requested.
* @color: (out caller-allocates): The color requested.
*
* Gets the specified palette entry from the specified palette.
*
......
......@@ -817,7 +817,7 @@ gimp_text_layer_set_justification (gint32 layer_ID,
/**
* gimp_text_layer_get_color:
* @layer_ID: The text layer.
* @color: (out): The color of the text.
* @color: (out caller-allocates): The color of the text.
*
* Get the color of the text in a text layer.
*
......
......@@ -53,7 +53,7 @@
/**
* gimp_rgb_to_hsv:
* @rgb: A color value in the RGB colorspace
* @hsv: The value converted to the HSV colorspace
* @hsv: (out caller-allocates): The value converted to the HSV colorspace
*
* Does a conversion from RGB to HSV (Hue, Saturation,
* Value) colorspace.
......@@ -106,7 +106,7 @@ gimp_rgb_to_hsv (const GimpRGB *rgb,
/**
* gimp_hsv_to_rgb:
* @hsv: A color value in the HSV colorspace
* @rgb: The returned RGB value.
* @rgb: (out caller-allocates): The returned RGB value.
*
* Converts a color value from HSV to RGB colorspace
**/
......@@ -185,7 +185,7 @@ gimp_hsv_to_rgb (const GimpHSV *hsv,
/**
* gimp_rgb_to_hsl:
* @rgb: A color value in the RGB colorspace
* @hsl: The value converted to HSL
* @hsl: (out caller-allocates): The value converted to HSL
*
* Convert an RGB color value to a HSL (Hue, Saturation, Lightness)
* color value.
......@@ -271,7 +271,8 @@ gimp_hsl_value (gdouble n1,
/**
* gimp_hsl_to_rgb:
* @hsl: A color value in the HSL colorspace
* @rgb: The value converted to a value in the RGB colorspace
* @rgb: (out caller-allocates): The value converted to a value
* in the RGB colorspace
*
* Convert a HSL color value to an RGB color value.
**/
......@@ -314,7 +315,8 @@ gimp_hsl_to_rgb (const GimpHSL *hsl,
* @rgb: A value in the RGB colorspace
* @pullout: A scaling value (0-1) indicating how much black should be
* pulled out
* @cmyk: The input value naively converted to the CMYK colorspace
* @cmyk: (out caller-allocates): The input value naively converted
* to the CMYK colorspace
*
* Does a naive conversion from RGB to CMYK colorspace. A simple
* formula that doesn't take any color-profiles into account is used.
......@@ -363,7 +365,7 @@ gimp_rgb_to_cmyk (const GimpRGB *rgb,
/**
* gimp_cmyk_to_rgb:
* @cmyk: A color value in the CMYK colorspace
* @rgb: The value converted to the RGB colorspace
* @rgb: (out caller-allocates): The value converted to the RGB colorspace
*
* Does a simple transformation from the CMYK colorspace to the RGB
* colorspace, without taking color profiles into account.
......
......@@ -159,7 +159,7 @@ gimp_rgb_set_pixel (GimpRGB *rgb,
* gimp_rgb_get_pixel:
* @rgb: a #GimpRGB struct
* @format: a Babl format
* @pixel: pointer to the destination pixel
* @pixel: (out caller-allocates): pointer to the destination pixel
*
* Writes the red, green, blue and alpha components of @rgb to the
* color stored in @pixel. The pixel format of @pixel is determined by
......@@ -428,7 +428,7 @@ gimp_rgba_set_pixel (GimpRGB *rgba,
* gimp_rgba_get_pixel:
* @rgba: a #GimpRGB struct
* @format: a Babl format
* @pixel: pointer to the destination pixel
* @pixel: (out caller-allocates): pointer to the destination pixel
*
* Writes the red, green, blue and alpha components of @rgba to the
* color stored in @pixel. The pixel format of @pixel is determined by
......
......@@ -649,7 +649,7 @@ enum
* gimp_scanner_parse_color:
* @scanner: A #GScanner created by gimp_scanner_new_file() or
* gimp_scanner_new_string()
* @dest: Pointer to a color to store the result
* @dest: (out caller-allocates): Pointer to a color to store the result
*
* Return value: %TRUE on success
*
......
......@@ -554,8 +554,9 @@ gimp_color_area_set_color (GimpColorArea *area,
/**
* gimp_color_area_get_color:
* @area: Pointer to a #GimpColorArea.
* @color: Pointer to a #GimpRGB struct that is used to return the color.
* @area: Pointer to a #GimpColorArea.
* @color: (out caller-allocates): Pointer to a #GimpRGB struct
* that is used to return the color.
*
* Retrieves the current color of the @area.
**/
......
......@@ -725,7 +725,8 @@ gimp_color_button_set_color (GimpColorButton *button,
/**
* gimp_color_button_get_color:
* @button: Pointer to a #GimpColorButton.
* @color: Pointer to a #GimpRGB struct used to return the color.
* @color: (out caller-allocates): Pointer to a #GimpRGB struct
* used to return the color.
*
* Retrieves the currently set color from the @button.
**/
......
......@@ -250,7 +250,7 @@ gimp_color_hex_entry_set_color (GimpColorHexEntry *entry,
/**
* gimp_color_hex_entry_get_color:
* @entry: a #GimpColorHexEntry widget
* @color: pointer to a #GimpRGB
* @color: (out caller-allocates): pointer to a #GimpRGB
*
* Retrieves the color value displayed by a #GimpColorHexEntry.
*
......
......@@ -471,7 +471,8 @@ gimp_color_selection_set_color (GimpColorSelection *selection,
/**
* gimp_color_selection_get_color:
* @selection: A #GimpColorSelection widget.
* @color: (out): Return location for the @selection's current @color.
* @color: (out caller-allocates): Return location for the
* @selection's current @color.
*
* This function returns the #GimpColorSelection's current color.
**/
......@@ -509,7 +510,8 @@ gimp_color_selection_set_old_color (GimpColorSelection *selection,
/**
* gimp_color_selection_get_old_color:
* @selection: A #GimpColorSelection widget.
* @color: (out): Return location for the @selection's old @color.
* @color: (out caller-allocates): Return location for the
* @selection's old @color.
*
* This function returns the #GimpColorSelection's old color.
**/
......
......@@ -377,8 +377,9 @@ gimp_color_selector_set_color (GimpColorSelector *selector,
/**
* gimp_color_selector_get_color:
* @selector: A #GimpColorSelector widget.
* @rgb: Return location for the color.
* @hsv: Return location for the same same color in HSV.
* @rgb: (out caller-allocates): Return location for the color.
* @hsv: (out caller-allocates): Return location for the same same
* color in HSV.
*
* Retrieves the color shown in the @selector widget.
*
......
......@@ -353,7 +353,13 @@ CODE
$argdesc .= " * \@$_->{libname}";
$argdesc .= '_ID' if $arg->{id};
$argdesc .= ": (out)";
if ($arg->{name} eq 'COLOR') {
$argdesc .= ": (out caller-allocates)";
}
else {
$argdesc .= ": (out)";
}
if (exists $arg->{array}) {
$argdesc .= " (array length=@outargs[$argc - 2]->{name})";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment