## EntanglePixbufLoader

EntanglePixbufLoader — an abstract base for loading image data

## Functions

gboolean | entangle_pixbuf_loader_is_ready ()
GdkPixbuf * | entangle_pixbuf_loader_get_pixbuf ()
GExiv2Metadata * | entangle_pixbuf_loader_get_metadata ()
gboolean | entangle_pixbuf_loader_load ()
gboolean | entangle_pixbuf_loader_unload ()
void | entangle_pixbuf_loader_trigger_reload ()
void | entangle_pixbuf_loader_set_colour_transform ()
EntangleColourProfileTransform * | entangle_pixbuf_loader_get_colour_transform ()
void | entangle_pixbuf_loader_set_workers ()
int | entangle_pixbuf_loader_get_workers ()

## Properties

EntangleColourProfileTransform * | colour-transform | Read / Write
gboolean | with-metadata | Read / Write / Construct Only
int | workers | Read / Write / Construct Only

## Signals

void | metadata-loaded | Run First
void | metadata-unloaded | Run First
void | pixbuf-loaded | Run First
void | pixbuf-unloaded | Run First

## Types and Values

#define | ENTANGLE_TYPE_PIXBUF_LOADER
struct | EntanglePixbufLoaderClass
| EntanglePixbufLoader

## Object Hierarchy

        GObject
        ╰── EntanglePixbufLoader
            ├── EntangleImageLoader
            ╰── EntangleThumbnailLoader

## Description

The EntanglePixbufLoader object provides common functionality needed when loading image data.

## Functions

### entangle_pixbuf_loader_is_ready ()

    gboolean
    entangle_pixbuf_loader_is_ready (EntanglePixbufLoader *loader,
                                     EntangleImage *image);

Determine if the image has completed loading. Normally it is better to wait for the 'pixbuf-loaded' or 'metadata-loaded' signals than to use this method. The return value of this method may be out of date if another thread concurrently requests unload of the image

#### Parameters

loader | the pixbuf loader |
image | the camera image |

#### Returns

a true value if the image is currently loaded

### entangle_pixbuf_loader_get_pixbuf ()

    GdkPixbuf *
    entangle_pixbuf_loader_get_pixbuf (EntanglePixbufLoader *loader,
                                       EntangleImage *image);

Get the loaded pixbuf for `image` , if any. If this is called before the 'pixbuf-loaded' signal is emitted then it will likely return NULL.

#### Parameters

loader | the pixbuf loader. | [transfer none]
image | the camera image. | [transfer none]

#### Returns

the pixbuf.

[allow-none][transfer none]

### entangle_pixbuf_loader_get_metadata ()

    GExiv2Metadata *
    entangle_pixbuf_loader_get_metadata (EntanglePixbufLoader *loader,
                                         EntangleImage *image);

Get the loaded metadata for `image` , if any. If this is called before the 'metadata-loaded' signal is emitted then it will likely return NULL.

#### Parameters

loader | the pixbuf loader. | [transfer none]
image | the camera image. | [transfer none]

#### Returns

the metadata.

[allow-none][transfer none]

### entangle_pixbuf_loader_load ()

    gboolean
    entangle_pixbuf_loader_load (EntanglePixbufLoader *loader,
                                 EntangleImage *image);

Request that `loader` have its pixbuf and metadata loaded. The loading of the data may take place asynchronously and the 'pixbuf-loaded' and 'metadata-loaded' signals will be emitted when completed.

#### Parameters

loader | the pixbuf loader. | [transfer none]
image | the camera image. | [transfer none]

#### Returns

a true value if the image was queued for loading

### entangle_pixbuf_loader_unload ()

    gboolean
    entangle_pixbuf_loader_unload (EntanglePixbufLoader *loader,
                                   EntangleImage *image);

Indicate that `image` is no longer required and can have its pixbuf / metadata unloaded. The unloading of the data may take place asynchronously and the 'pixbuf-unloaded' and 'metadata-unloaded' signals will be emitted when completed.

#### Parameters

loader | the pixbuf loader. | [transfer none]
image | the camera image. | [transfer none]

#### Returns

a true value if the image was unloaded

### entangle_pixbuf_loader_trigger_reload ()

    void
    entangle_pixbuf_loader_trigger_reload (EntanglePixbufLoader *loader);

Request a mass reload of the data associated with all images

#### Parameters

loader | the image loader |

### entangle_pixbuf_loader_set_colour_transform ()

    void
    entangle_pixbuf_loader_set_colour_transform
                                   (EntanglePixbufLoader *loader,
                                    EntangleColourProfileTransform *transform);

Set the colour profile transform that will be applied when loading images. This will trigger a mass-reload of all existing images to update their colour profile

#### Parameters

loader | the pixbuf loader |
transform | the new colour profile transform |

### entangle_pixbuf_loader_get_colour_transform ()

    EntangleColourProfileTransform *
    entangle_pixbuf_loader_get_colour_transform
                                   (EntanglePixbufLoader *loader);

Get the colour transform that will be applied when loading images

#### Parameters

loader | the pixbuf loader |

#### Returns

the colour profile transform.

[allow-none][transfer none]

### entangle_pixbuf_loader_set_workers ()

    void
    entangle_pixbuf_loader_set_workers (EntanglePixbufLoader *loader,
                                        int count);

Set the maximum number of worker threads for the pixbuf loader

#### Parameters

loader | the pixbuf loader |
count | the new limit on workers |

### entangle_pixbuf_loader_get_workers ()

    int
    entangle_pixbuf_loader_get_workers (EntanglePixbufLoader *loader);

Get the number of worker threads associated with the loader

#### Parameters

loader | the pixbuf loader |

#### Returns

the maximum number of worker threads

## Types and Values

### ENTANGLE_TYPE_PIXBUF_LOADER

    #define ENTANGLE_TYPE_PIXBUF_LOADER (entangle_pixbuf_loader_get_type())

### struct EntanglePixbufLoaderClass

    struct EntanglePixbufLoaderClass {
        GdkPixbuf *(*pixbuf_load)(EntanglePixbufLoader *loader,
                                  EntangleImage *image,
                                  GExiv2Metadata **metadata);
    };

### EntanglePixbufLoader

    typedef struct _EntanglePixbufLoader EntanglePixbufLoader;

## Property Details

### The `“colour-transform”` property

      “colour-transform”         EntangleColourProfileTransform *

Colour profile transformation.

Owner: EntanglePixbufLoader

Flags: Read / Write

### The `“with-metadata”` property

      “with-metadata”            gboolean

Load image metadata.

Owner: EntanglePixbufLoader

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“workers”` property

      “workers”                  int

Number of worker threads to load pixbufs.

Owner: EntanglePixbufLoader

Flags: Read / Write / Construct Only

Allowed values: [1,64]

Default value: 1

## Signal Details

### The `“metadata-loaded”` signal

    void
    user_function (EntanglePixbufLoader *entanglepixbufloader,
                   EntangleImage        *arg1,
                   gpointer              user_data)

Flags: Run First

### The `“metadata-unloaded”` signal

    void
    user_function (EntanglePixbufLoader *entanglepixbufloader,
                   EntangleImage        *arg1,
                   gpointer              user_data)

Flags: Run First

### The `“pixbuf-loaded”` signal

    void
    user_function (EntanglePixbufLoader *entanglepixbufloader,
                   EntangleImage        *arg1,
                   gpointer              user_data)

Flags: Run First

### The `“pixbuf-unloaded”` signal

    void
    user_function (EntanglePixbufLoader *entanglepixbufloader,
                   EntangleImage        *arg1,
                   gpointer              user_data)

Flags: Run First