libgimp: API with new object classes are since 3.0.

Even when the function names may have stayed the same in most cases, the
API has changed. The "Since:" tag must therefore be bumped.

Also adding docs for gimp_drawable_get_sub_thumbnail_data() which had
none.
This commit is contained in:
Jehan 2019-08-30 16:38:03 +02:00
parent f4b97e740c
commit e24375e64a
7 changed files with 67 additions and 27 deletions

View file

@ -66,6 +66,8 @@ gimp_channel_init (GimpChannel *channel)
*
* Returns: (transfer none): The newly created channel.
* The object belongs to libgimp and you should not free it.
*
* Since: 3.0
*/
GimpChannel *
gimp_channel_new (GimpImage *image,

View file

@ -188,7 +188,7 @@ gimp_display_get_by_id (gint32 display_id)
*
* Returns: Whether the display is valid.
*
* Since: 2.4
* Since: 3.0
**/
gboolean
gimp_display_is_valid (GimpDisplay *display)

View file

@ -64,6 +64,8 @@ gimp_drawable_init (GimpDrawable *drawable)
*
* Returns: (transfer full) (nullable): thumbnail data or %NULL if
* @drawable is invalid.
*
* Since: 3.0
**/
guchar *
gimp_drawable_get_thumbnail_data (GimpDrawable *drawable,
@ -104,7 +106,7 @@ gimp_drawable_get_thumbnail_data (GimpDrawable *drawable,
*
* Returns: (transfer full): a new #GdkPixbuf
*
* Since: 2.2
* Since: 3.0
**/
GdkPixbuf *
gimp_drawable_get_thumbnail (GimpDrawable *drawable,
@ -133,6 +135,25 @@ gimp_drawable_get_thumbnail (GimpDrawable *drawable,
return NULL;
}
/**
* gimp_drawable_get_sub_thumbnail_data:
* @drawable: the drawable ID
* @src_x: the x coordinate of the area
* @src_y: the y coordinate of the area
* @src_width: the width of the area
* @src_height: the height of the area
* @dest_width: (inout): the requested thumbnail width (<= 1024 pixels)
* @dest_height: (inout): the requested thumbnail height (<= 1024 pixels)
* @bpp: (out): the bytes per pixel of the returned thumbnail data
*
* Retrieves thumbnail data for the drawable identified by @drawable.
* The thumbnail will be not larger than the requested size.
*
* Returns: (transfer full) (nullable): thumbnail data or %NULL if
* @drawable is invalid.
*
* Since: 3.0
**/
guchar *
gimp_drawable_get_sub_thumbnail_data (GimpDrawable *drawable,
gint src_x,
@ -182,7 +203,7 @@ gimp_drawable_get_sub_thumbnail_data (GimpDrawable *drawable,
*
* Returns: (transfer full): a new #GdkPixbuf
*
* Since: 2.2
* Since: 3.0
**/
GdkPixbuf *
gimp_drawable_get_sub_thumbnail (GimpDrawable *drawable,
@ -234,7 +255,7 @@ gimp_drawable_get_sub_thumbnail (GimpDrawable *drawable,
*
* See Also: gimp_drawable_get_shadow_buffer()
*
* Since: 2.10
* Since: 3.0
*/
GeglBuffer *
gimp_drawable_get_buffer (GimpDrawable *drawable)
@ -267,7 +288,7 @@ gimp_drawable_get_buffer (GimpDrawable *drawable)
*
* See Also: gimp_drawable_get_shadow_buffer()
*
* Since: 2.10
* Since: 3.0
*/
GeglBuffer *
gimp_drawable_get_shadow_buffer (GimpDrawable *drawable)
@ -295,7 +316,7 @@ gimp_drawable_get_shadow_buffer (GimpDrawable *drawable)
*
* Returns: The #Babl format.
*
* Since: 2.10
* Since: 3.0
*/
const Babl *
gimp_drawable_get_format (GimpDrawable *drawable)
@ -373,6 +394,7 @@ gimp_drawable_get_format (GimpDrawable *drawable)
return format;
}
/**
* gimp_drawable_get_thumbnail_format:
* @drawable: the ID of the #GimpDrawable to get the thumbnail format for.
@ -381,7 +403,7 @@ gimp_drawable_get_format (GimpDrawable *drawable)
*
* Returns: The #Babl thumbnail format.
*
* Since: 2.10.14
* Since: 3.0
*/
const Babl *
gimp_drawable_get_thumbnail_format (GimpDrawable *drawable)

View file

@ -186,7 +186,7 @@ gimp_image_get_by_id (gint32 image_id)
*
* Returns: Whether the image is valid.
*
* Since: 2.4
* Since: 3.0
**/
gboolean
gimp_image_is_valid (GimpImage *image)
@ -275,6 +275,8 @@ gimp_list_images (void)
* The list of layers contained in the image.
* The returned array must be freed with g_free(). Layer
* elements belong to libgimp and must not be freed.
*
* Since: 3.0
**/
GimpLayer **
gimp_image_get_layers (GimpImage *image,
@ -313,6 +315,8 @@ gimp_image_get_layers (GimpImage *image,
* The list of channels contained in the image.
* The returned array must be freed with g_free(). Channel
* elements belong to libgimp and must not be freed.
*
* Since: 3.0
**/
GimpChannel **
gimp_image_get_channels (GimpImage *image,
@ -348,6 +352,8 @@ gimp_image_get_channels (GimpImage *image,
* The list of vectors contained in the image.
* The returned array must be freed with g_free(). Vectors
* elements belong to libgimp and must not be freed.
*
* Since: 3.0
**/
GimpVectors **
gimp_image_get_vectors (GimpImage *image,
@ -489,6 +495,8 @@ gimp_image_list_vectors (GimpImage *image)
* is not of base type INDEXED, this pointer will be NULL.
*
* Returns: The image's colormap.
*
* Since: 3.0
*/
guchar *
gimp_image_get_colormap (GimpImage *image,
@ -519,6 +527,8 @@ gimp_image_get_colormap (GimpImage *image,
* in the "cmap" array.
*
* Returns: TRUE on success.
*
* Since: 3.0
*/
gboolean
gimp_image_set_colormap (GimpImage *image,
@ -543,6 +553,8 @@ gimp_image_set_colormap (GimpImage *image,
* gives the number of bytes per pixel in the image.
*
* Returns: (transfer full): the thumbnail data.
*
* Since: 3.0
**/
guchar *
gimp_image_get_thumbnail_data (GimpImage *image,
@ -582,7 +594,7 @@ gimp_image_get_thumbnail_data (GimpImage *image,
*
* Returns: (transfer full): a new #GdkPixbuf
*
* Since: 2.2
* Since: 3.0
**/
GdkPixbuf *
gimp_image_get_thumbnail (GimpImage *image,
@ -621,7 +633,7 @@ gimp_image_get_thumbnail (GimpImage *image,
* Returns: (nullable) (transfer full): The exif/ptc/xmp metadata,
* or %NULL if there is none.
*
* Since: 2.10
* Since: 3.0
**/
GimpMetadata *
gimp_image_get_metadata (GimpImage *image)
@ -651,7 +663,7 @@ gimp_image_get_metadata (GimpImage *image)
*
* Returns: TRUE on success.
*
* Since: 2.10
* Since: 3.0
**/
gboolean
gimp_image_set_metadata (GimpImage *image,

View file

@ -218,7 +218,7 @@ gimp_item_get_by_id (gint32 item_id)
*
* Returns: Whether the item is valid.
*
* Since: 2.8
* Since: 3.0
**/
gboolean
gimp_item_is_valid (GimpItem *item)
@ -236,7 +236,7 @@ gimp_item_is_valid (GimpItem *item)
*
* Returns: TRUE if the item is a drawable, FALSE otherwise.
*
* Since: 2.8
* Since: 3.0
**/
gboolean
gimp_item_is_drawable (GimpItem *item)
@ -254,7 +254,7 @@ gimp_item_is_drawable (GimpItem *item)
*
* Returns: TRUE if the item is a layer, FALSE otherwise.
*
* Since: 2.8
* Since: 3.0
**/
gboolean
gimp_item_is_layer (GimpItem *item)
@ -273,7 +273,7 @@ gimp_item_is_layer (GimpItem *item)
*
* Returns: TRUE if the item is a text layer, FALSE otherwise.
*
* Since: 2.8
* Since: 3.0
**/
gboolean
gimp_item_is_text_layer (GimpItem *item)
@ -291,7 +291,7 @@ gimp_item_is_text_layer (GimpItem *item)
*
* Returns: TRUE if the item is a channel, FALSE otherwise.
*
* Since: 2.8
* Since: 3.0
**/
gboolean
gimp_item_is_channel (GimpItem *item)
@ -310,7 +310,7 @@ gimp_item_is_channel (GimpItem *item)
*
* Returns: TRUE if the item is a layer mask, FALSE otherwise.
*
* Since: 2.8
* Since: 3.0
**/
gboolean
gimp_item_is_layer_mask (GimpItem *item)
@ -328,7 +328,7 @@ gimp_item_is_layer_mask (GimpItem *item)
*
* Returns: TRUE if the item is a selection, FALSE otherwise.
*
* Since: 2.8
* Since: 3.0
**/
gboolean
gimp_item_is_selection (GimpItem *item)
@ -346,7 +346,7 @@ gimp_item_is_selection (GimpItem *item)
*
* Returns: TRUE if the item is a vectors, FALSE otherwise.
*
* Since: 2.8
* Since: 3.0
**/
gboolean
gimp_item_is_vectors (GimpItem *item)
@ -368,6 +368,8 @@ gimp_item_is_vectors (GimpItem *item)
* The item's list of children.
* The returned array must be freed with g_free(). Item
* elements belong to libgimp and must not be unrefed.
*
* Since: 3.0
**/
GimpItem **
gimp_item_get_children (GimpItem *item,

View file

@ -136,7 +136,7 @@ gimp_layer_copy (GimpLayer *layer)
* Returns: (transfer none): The newly created layer.
* The object belongs to libgimp and you should not free it.
*
* Since: 2.2
* Since: 3.0
*/
GimpLayer *
gimp_layer_new_from_pixbuf (GimpImage *image,
@ -215,14 +215,14 @@ gimp_layer_new_from_pixbuf (GimpImage *image,
* Returns: (transfer none): The newly created layer.
* The object belongs to libgimp and you should not free it.
*
* Since: 2.8
* Since: 3.0
*/
GimpLayer *
gimp_layer_new_from_surface (GimpImage *image,
const gchar *name,
cairo_surface_t *surface,
gdouble progress_start,
gdouble progress_end)
gimp_layer_new_from_surface (GimpImage *image,
const gchar *name,
cairo_surface_t *surface,
gdouble progress_start,
gdouble progress_end)
{
GeglBuffer *src_buffer;
GeglBuffer *dest_buffer;
@ -278,7 +278,7 @@ gimp_layer_new_from_surface (GimpImage *image,
}
/* Deprecate API. */
/* Deprecated API. */
/**

View file

@ -62,6 +62,8 @@ gimp_selection_init (GimpSelection *selection)
* positioning of the new floating selection.
*
* Returns: (transfer none): The floated layer.
*
* Since: 3.0
*/
GimpLayer *
gimp_selection_float (GimpImage *image,