Gimp.LinkLayer

g GObject.GInterface GObject.GInterface Gimp.Rasterizable Gimp.Rasterizable GObject.GInterface->Gimp.Rasterizable GObject.Object GObject.Object Gimp.Item Gimp.Item GObject.Object->Gimp.Item Gimp.Drawable Gimp.Drawable Gimp.Layer Gimp.Layer Gimp.Drawable->Gimp.Layer Gimp.Item->Gimp.Drawable Gimp.LinkLayer Gimp.LinkLayer Gimp.Layer->Gimp.LinkLayer Gimp.Rasterizable->Gimp.LinkLayer

Subclasses:

None

Methods

Inherited:

Gimp.Layer (37), Gimp.Drawable (55), Gimp.Item (59), GObject.Object (37), Gimp.Rasterizable (3)

Structs:

GObject.ObjectClass (5)

class

get_by_id (layer_id)

class

new (image, file)

get_file ()

get_mime_type ()

set_file (file)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

Gimp.Item (1)

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Gimp.LinkLayer(**kwargs)
Bases:

Gimp.Layer, Gimp.Rasterizable

Abstract:

No

Structure:

Gimp.LinkLayerClass

Functions for querying and manipulating link layers.

classmethod get_by_id(layer_id)
Parameters:

layer_id (int) – The layer id.

Returns:

a Gimp.LinkLayer for layer_id or None if layer_id does not represent a valid link layer. The object belongs to libgimp and you must not modify or unref it.

Return type:

Gimp.LinkLayer or None

Returns a Gimp.LinkLayer representing layer_id. This function calls [func`Gimp`.Item.get_by_id] and returns the item if it is a link layer or None otherwise.

New in version 3.2.

classmethod new(image, file)
Parameters:
  • image (Gimp.Image) – The image.

  • file (Gio.File) – The file this link layer will monitor.

Returns:

The new link layer. The object belongs to libgimp and you should not free it.

Return type:

Gimp.LinkLayer

Create a new link layer.

This procedure creates a link layer monitoring the specified file.

The new layer still needs to be added to the image as this is not automatic. Add the new layer with the [method`Image`.insert_layer] method.

The arguments are kept as simple as necessary for the basic case. All link attributes, however, can be modified with the appropriate gimp_link_layer_set_*() procedures.

New in version 3.2.

get_file()
Returns:

The monitored file.

Return type:

Gio.File

Get the monitored file.

This procedure returns the file which is being monitored.

New in version 3.2.

get_mime_type()
Returns:

The mime type of the monitored file. The returned value must be freed with GLib.free().

Return type:

str

Get the mime type of the monitored file.

This procedure returns the mime type of the file which is being monitored by self.

Note that this will be the real mime type, corresponding to our format support, as returned by the [class`Gimp`.LoadProcedure] which actually performs the external image file import.

This function may also return None in case of error (for instance if the external file doesn’t exist anymore).

New in version 3.2.

set_file(file)
Parameters:

file (Gio.File) – The file to monitor.

Returns:

True on success.

Return type:

bool

Set the monitored file.

This procedure sets the file to be monitored. It may change the layer’s render.

New in version 3.2.