gimpitem

gimpitem — Functions to manipulate items.

Functions

GimpItem * gimp_item_get_by_id ()
gint32 gimp_item_get_id ()
gboolean gimp_item_is_valid ()
gboolean gimp_item_id_is_valid ()
GimpImage * gimp_item_get_image ()
gboolean gimp_item_delete ()
gboolean gimp_item_is_drawable ()
gboolean gimp_item_id_is_drawable ()
gboolean gimp_item_is_layer ()
gboolean gimp_item_id_is_layer ()
gboolean gimp_item_is_text_layer ()
gboolean gimp_item_id_is_text_layer ()
gboolean gimp_item_is_channel ()
gboolean gimp_item_id_is_channel ()
gboolean gimp_item_is_layer_mask ()
gboolean gimp_item_id_is_layer_mask ()
gboolean gimp_item_is_selection ()
gboolean gimp_item_id_is_selection ()
gboolean gimp_item_is_vectors ()
gboolean gimp_item_id_is_vectors ()
gboolean gimp_item_is_group ()
GimpItem * gimp_item_get_parent ()
GimpItem ** gimp_item_get_children ()
GList * gimp_item_list_children ()
gboolean gimp_item_get_expanded ()
gboolean gimp_item_set_expanded ()
gchar * gimp_item_get_name ()
gboolean gimp_item_set_name ()
gboolean gimp_item_get_visible ()
gboolean gimp_item_set_visible ()
gboolean gimp_item_get_linked ()
gboolean gimp_item_set_linked ()
gboolean gimp_item_get_lock_content ()
gboolean gimp_item_set_lock_content ()
gboolean gimp_item_get_lock_position ()
gboolean gimp_item_set_lock_position ()
GimpColorTag gimp_item_get_color_tag ()
gboolean gimp_item_set_color_tag ()
guint gimp_item_get_tattoo ()
gboolean gimp_item_set_tattoo ()
gboolean gimp_item_attach_parasite ()
gboolean gimp_item_detach_parasite ()
GimpParasite * gimp_item_get_parasite ()
gchar ** gimp_item_get_parasite_list ()

Object Hierarchy

    GObject
    ╰── GimpItem
        ├── GimpDrawable
        ╰── GimpVectors

Description

Functions to manipulate items.

Functions

gimp_item_get_by_id ()

GimpItem *
gimp_item_get_by_id (gint32 item_id);

Returns a GimpItem representing item_id . Since GimpItem is an abstract class, the real object type will actually be the proper subclass.

Parameters

item_id

The item id.

 

Returns

a GimpItem for item_id or NULL if item_id does not represent a valid item. The object belongs to libgimp and you must not modify or unref it.

[nullable][transfer none]

Since: 3.0


gimp_item_get_id ()

gint32
gimp_item_get_id (GimpItem *item);

Parameters

item

The item.

 

Returns

the item ID.

Since: 3.0


gimp_item_is_valid ()

gboolean
gimp_item_is_valid (GimpItem *item);

Returns TRUE if the item is valid.

This procedure checks if the given item is valid and refers to an existing item.

Parameters

item

The item to check.

 

Returns

Whether the item is valid.

Since: 2.8


gimp_item_id_is_valid ()

gboolean
gimp_item_id_is_valid (gint item_id);

Returns TRUE if the item ID is valid.

This procedure checks if the given item ID is valid and refers to an existing item.

Parameters

item_id

The item ID to check.

 

Returns

Whether the item ID is valid.

Since: 3.0


gimp_item_get_image ()

GimpImage *
gimp_item_get_image (GimpItem *item);

Returns the item's image.

This procedure returns the item's image.

Parameters

item

The item.

 

Returns

The item's image.

[transfer none]

Since: 2.8


gimp_item_delete ()

gboolean
gimp_item_delete (GimpItem *item);

Delete a item.

This procedure deletes the specified item. This must not be done if the image containing this item was already deleted or if the item was already removed from the image. The only case in which this procedure is useful is if you want to get rid of a item which has not yet been added to an image.

Parameters

item

The item to delete.

 

Returns

TRUE on success.

Since: 2.8


gimp_item_is_drawable ()

gboolean
gimp_item_is_drawable (GimpItem *item);

Returns whether the item is a drawable.

This procedure returns TRUE if the specified item is a drawable.

Parameters

item

The item.

 

Returns

TRUE if the item is a drawable, FALSE otherwise.

Since: 2.8


gimp_item_id_is_drawable ()

gboolean
gimp_item_id_is_drawable (gint item_id);

Returns whether the item ID is a drawable.

This procedure returns TRUE if the specified item ID is a drawable.

Parameters

item_id

The item ID.

 

Returns

TRUE if the item ID is a drawable, FALSE otherwise.

Since: 3.0


gimp_item_is_layer ()

gboolean
gimp_item_is_layer (GimpItem *item);

Returns whether the item is a layer.

This procedure returns TRUE if the specified item is a layer.

Parameters

item

The item.

 

Returns

TRUE if the item is a layer, FALSE otherwise.

Since: 2.8


gimp_item_id_is_layer ()

gboolean
gimp_item_id_is_layer (gint item_id);

Returns whether the item ID is a layer.

This procedure returns TRUE if the specified item ID is a layer.

Parameters

item_id

The item ID.

 

Returns

TRUE if the item is a layer, FALSE otherwise.

Since: 3.0


gimp_item_is_text_layer ()

gboolean
gimp_item_is_text_layer (GimpItem *item);

Returns whether the item is a text layer.

This procedure returns TRUE if the specified item is a text layer.

Parameters

item

The item.

 

Returns

TRUE if the item is a text layer, FALSE otherwise.

Since: 2.8


gimp_item_id_is_text_layer ()

gboolean
gimp_item_id_is_text_layer (gint item_id);

Returns whether the item ID is a text layer.

This procedure returns TRUE if the specified item ID is a text layer.

Parameters

item_id

The item ID.

 

Returns

TRUE if the item is a text layer, FALSE otherwise.

Since: 3.0


gimp_item_is_channel ()

gboolean
gimp_item_is_channel (GimpItem *item);

Returns whether the item is a channel.

This procedure returns TRUE if the specified item is a channel.

Parameters

item

The item.

 

Returns

TRUE if the item is a channel, FALSE otherwise.

Since: 2.8


gimp_item_id_is_channel ()

gboolean
gimp_item_id_is_channel (gint item_id);

Returns whether the item ID is a channel.

This procedure returns TRUE if the specified item ID is a channel.

Parameters

item_id

The item ID.

 

Returns

TRUE if the item ID is a channel, FALSE otherwise.

Since: 3.0


gimp_item_is_layer_mask ()

gboolean
gimp_item_is_layer_mask (GimpItem *item);

Returns whether the item is a layer mask.

This procedure returns TRUE if the specified item is a layer mask.

Parameters

item

The item.

 

Returns

TRUE if the item is a layer mask, FALSE otherwise.

Since: 2.8


gimp_item_id_is_layer_mask ()

gboolean
gimp_item_id_is_layer_mask (gint item_id);

Returns whether the item ID is a layer mask.

This procedure returns TRUE if the specified item ID is a layer mask.

Parameters

item_id

The item.

 

Returns

TRUE if the item ID is a layer mask, FALSE otherwise.

Since: 3.0


gimp_item_is_selection ()

gboolean
gimp_item_is_selection (GimpItem *item);

Returns whether the item is a selection.

This procedure returns TRUE if the specified item is a selection.

Parameters

item

The item.

 

Returns

TRUE if the item is a selection, FALSE otherwise.

Since: 2.8


gimp_item_id_is_selection ()

gboolean
gimp_item_id_is_selection (gint item_id);

Returns whether the item ID is a selection.

This procedure returns TRUE if the specified item ID is a selection.

Parameters

item_id

The item ID.

 

Returns

TRUE if the item ID is a selection, FALSE otherwise.

Since: 3.0


gimp_item_is_vectors ()

gboolean
gimp_item_is_vectors (GimpItem *item);

Returns whether the item is a vectors.

This procedure returns TRUE if the specified item is a vectors.

Parameters

item

The item.

 

Returns

TRUE if the item is a vectors, FALSE otherwise.

Since: 2.8


gimp_item_id_is_vectors ()

gboolean
gimp_item_id_is_vectors (gint item_id);

Returns whether the item ID is a vectors.

This procedure returns TRUE if the specified item ID is a vectors.

Parameters

item_id

The item ID.

 

Returns

TRUE if the item ID is a vectors, FALSE otherwise.

Since: 3.0


gimp_item_is_group ()

gboolean
gimp_item_is_group (GimpItem *item);

Returns whether the item is a group item.

This procedure returns TRUE if the specified item is a group item which can have children.

Parameters

item

The item.

 

Returns

TRUE if the item is a group, FALSE otherwise.

Since: 2.8


gimp_item_get_parent ()

GimpItem *
gimp_item_get_parent (GimpItem *item);

Returns the item's parent item.

This procedure returns the item's parent item, if any.

Parameters

item

The item.

 

Returns

The item's parent item.

[transfer none]

Since: 2.8


gimp_item_get_children ()

GimpItem **
gimp_item_get_children (GimpItem *item,
                        gint *num_children);

Returns the item's list of children.

This procedure returns the list of items which are children of the specified item. The order is topmost to bottommost.

Parameters

item

The item.

 

num_children

The item's number of children.

[out]

Returns

The item's list of children. The returned value must be freed with g_free().

[array length=num_children][element-type GimpItem][transfer container]

Since: 2.8


gimp_item_list_children ()

GList *
gimp_item_list_children (GimpItem *item);

Returns the item's list of children.

This procedure returns the list of items which are children of the specified item. The order is topmost to bottommost.

Parameters

item

The item.

 

Returns

The item's list of children. The returned list must be freed with g_list_free(). Item elements belong to libgimp and must not be unrefed.

[element-type GimpItem][transfer container]

Since: 3.0


gimp_item_get_expanded ()

gboolean
gimp_item_get_expanded (GimpItem *item);

Returns whether the item is expanded.

This procedure returns TRUE if the specified item is expanded.

Parameters

item

The item.

 

Returns

TRUE if the item is expanded, FALSE otherwise.

Since: 2.10


gimp_item_set_expanded ()

gboolean
gimp_item_set_expanded (GimpItem *item,
                        gboolean expanded);

Sets the expanded state of the item.

This procedure expands or collapses the item.

Parameters

item

The item.

 

expanded

TRUE to expand the item, FALSE to collapse the item.

 

Returns

TRUE on success.

Since: 2.10


gimp_item_get_name ()

gchar *
gimp_item_get_name (GimpItem *item);

Get the name of the specified item.

This procedure returns the specified item's name.

Parameters

item

The item.

 

Returns

The item name. The returned value must be freed with g_free().

[transfer full]

Since: 2.8


gimp_item_set_name ()

gboolean
gimp_item_set_name (GimpItem *item,
                    const gchar *name);

Set the name of the specified item.

This procedure sets the specified item's name.

Parameters

item

The item.

 

name

The new item name.

 

Returns

TRUE on success.

Since: 2.8


gimp_item_get_visible ()

gboolean
gimp_item_get_visible (GimpItem *item);

Get the visibility of the specified item.

This procedure returns the specified item's visibility.

Parameters

item

The item.

 

Returns

The item visibility.

Since: 2.8


gimp_item_set_visible ()

gboolean
gimp_item_set_visible (GimpItem *item,
                       gboolean visible);

Set the visibility of the specified item.

This procedure sets the specified item's visibility.

Parameters

item

The item.

 

visible

The new item visibility.

 

Returns

TRUE on success.

Since: 2.8


gimp_item_get_linked ()

gboolean
gimp_item_get_linked (GimpItem *item);

Get the linked state of the specified item.

This procedure returns the specified item's linked state.

Parameters

item

The item.

 

Returns

The item linked state (for moves).

Since: 2.8


gimp_item_set_linked ()

gboolean
gimp_item_set_linked (GimpItem *item,
                      gboolean linked);

Set the linked state of the specified item.

This procedure sets the specified item's linked state.

Parameters

item

The item.

 

linked

The new item linked state.

 

Returns

TRUE on success.

Since: 2.8


gimp_item_get_lock_content ()

gboolean
gimp_item_get_lock_content (GimpItem *item);

Get the 'lock content' state of the specified item.

This procedure returns the specified item's lock content state.

Parameters

item

The item.

 

Returns

Whether the item's contents are locked.

Since: 2.8


gimp_item_set_lock_content ()

gboolean
gimp_item_set_lock_content (GimpItem *item,
                            gboolean lock_content);

Set the 'lock content' state of the specified item.

This procedure sets the specified item's lock content state.

Parameters

item

The item.

 

lock_content

The new item 'lock content' state.

 

Returns

TRUE on success.

Since: 2.8


gimp_item_get_lock_position ()

gboolean
gimp_item_get_lock_position (GimpItem *item);

Get the 'lock position' state of the specified item.

This procedure returns the specified item's lock position state.

Parameters

item

The item.

 

Returns

Whether the item's position is locked.

Since: 2.10


gimp_item_set_lock_position ()

gboolean
gimp_item_set_lock_position (GimpItem *item,
                             gboolean lock_position);

Set the 'lock position' state of the specified item.

This procedure sets the specified item's lock position state.

Parameters

item

The item.

 

lock_position

The new item 'lock position' state.

 

Returns

TRUE on success.

Since: 2.10


gimp_item_get_color_tag ()

GimpColorTag
gimp_item_get_color_tag (GimpItem *item);

Get the color tag of the specified item.

This procedure returns the specified item's color tag.

Parameters

item

The item.

 

Returns

The item's color tag.

Since: 2.10


gimp_item_set_color_tag ()

gboolean
gimp_item_set_color_tag (GimpItem *item,
                         GimpColorTag color_tag);

Set the color tag of the specified item.

This procedure sets the specified item's color tag.

Parameters

item

The item.

 

color_tag

The new item color tag.

 

Returns

TRUE on success.

Since: 2.10


gimp_item_get_tattoo ()

guint
gimp_item_get_tattoo (GimpItem *item);

Get the tattoo of the specified item.

This procedure returns the specified item's tattoo. A tattoo is a unique and permanent identifier attached to a item that can be used to uniquely identify a item within an image even between sessions.

Parameters

item

The item.

 

Returns

The item tattoo.

Since: 2.8


gimp_item_set_tattoo ()

gboolean
gimp_item_set_tattoo (GimpItem *item,
                      guint tattoo);

Set the tattoo of the specified item.

This procedure sets the specified item's tattoo. A tattoo is a unique and permanent identifier attached to a item that can be used to uniquely identify a item within an image even between sessions.

Parameters

item

The item.

 

tattoo

The new item tattoo.

 

Returns

TRUE on success.

Since: 2.8


gimp_item_attach_parasite ()

gboolean
gimp_item_attach_parasite (GimpItem *item,
                           const GimpParasite *parasite);

Add a parasite to an item.

This procedure attaches a parasite to an item. It has no return values.

Parameters

item

The item.

 

parasite

The parasite to attach to the item.

 

Returns

TRUE on success.

Since: 2.8


gimp_item_detach_parasite ()

gboolean
gimp_item_detach_parasite (GimpItem *item,
                           const gchar *name);

Removes a parasite from an item.

This procedure detaches a parasite from an item. It has no return values.

Parameters

item

The item.

 

name

The name of the parasite to detach from the item.

 

Returns

TRUE on success.

Since: 2.8


gimp_item_get_parasite ()

GimpParasite *
gimp_item_get_parasite (GimpItem *item,
                        const gchar *name);

Look up a parasite in an item

Finds and returns the parasite that is attached to an item.

Parameters

item

The item.

 

name

The name of the parasite to find.

 

Returns

The found parasite.

[transfer full]

Since: 2.8


gimp_item_get_parasite_list ()

gchar **
gimp_item_get_parasite_list (GimpItem *item,
                             gint *num_parasites);

List all parasites.

Returns a list of all parasites currently attached the an item.

Parameters

item

The item.

 

num_parasites

The number of attached parasites.

[out]

Returns

The names of currently attached parasites. The returned value must be freed with g_strfreev().

[array length=num_parasites][element-type gchar*][transfer full]

Since: 2.8