### Interface

# GeglMetadata

#### Description

    interface Gegl.Metadata : GObject.Object

No description available.

#### Prerequisite

In order to implement Metadata, your type must inherit from`GObject`.

#### Implementations

- GeglMetadataHash
- GeglMetadataStore

#### Instance methods

###### gegl_metadata_get_resolution

Retrieve resolution from the application image metadata. Intended for use by the image file writer. If resolution is not supported by the application or if the operation fails `FALSE` is returned and the resolution values are not updated.

###### gegl_metadata_iter_get_value

Retrieve image file metadata from the application. Intended for use by the image file writer. If the operation fails it returns `FALSE` and `value` is not updated.

###### gegl_metadata_iter_init

Initialise an iterator to find all supported metadata keys.

###### gegl_metadata_iter_lookup

Look up the specified key and initialise an iterator to reference the associated metadata. The iterator is used in conjunction with `gegl_metadata_set_value()` and gegl_metadata_get_value(). Note that this iterator is not valid for gegl_metadata_iter_next().

###### gegl_metadata_iter_next

Move the iterator to the next metadata item.

###### gegl_metadata_iter_set_value

Set application data retrieved from image file’s metadata. Intended for use by the image file reader. If the operation fails it returns `FALSE` and `value` is ignored.

###### gegl_metadata_register_map

Set the name of the file module and pass an array of mappings from file-format specific metadata names to those used by Gegl. A GValue transformation function may be supplied, e.g. to parse or format timestamps.

###### gegl_metadata_set_resolution

Set resolution retrieved from image file’s metadata. Intended for use by the image file reader. If resolution is not supported by the application or if the operation fails `FALSE` is returned and the values are ignored.

###### gegl_metadata_unregister_map

Unregister the file module mappings and any further mappings added or modified by the application. This should be called after the file module completes operations.

#### Interface structure

    struct GeglMetadataInterface {
      void (* register_map) (
        GeglMetadata* metadata,
        const gchar* file_module,
        guint flags,
        const GeglMetadataMap* map,
        gsize n_map
      );
      gboolean (* set_resolution) (
        GeglMetadata* metadata,
        GeglResolutionUnit unit,
        gfloat x,
        gfloat y
      );
      gboolean (* get_resolution) (
        GeglMetadata* metadata,
        GeglResolutionUnit* unit,
        gfloat* x,
        gfloat* y
      );
      gboolean (* iter_lookup) (
        GeglMetadata* metadata,
        GeglMetadataIter* iter,
        const gchar* key
      );
      void (* iter_init) (
        GeglMetadata* metadata,
        GeglMetadataIter* iter
      );
      const gchar* (* iter_next) (
        GeglMetadata* metadata,
        GeglMetadataIter* iter
      );
      gboolean (* iter_set_value) (
        GeglMetadata* metadata,
        GeglMetadataIter* iter,
        const GValue* value
      );
      gboolean (* iter_get_value) (
        GeglMetadata* metadata,
        GeglMetadataIter* iter,
        GValue* value
      );

    }

The `GeglMetadata` interface structure.

###### Interface members

`register_map`

    void (* register_map) (
        GeglMetadata* metadata,
        const gchar* file_module,
        guint flags,
        const GeglMetadataMap* map,
        gsize n_map
      )

| No description available.

`set_resolution`

    gboolean (* set_resolution) (
        GeglMetadata* metadata,
        GeglResolutionUnit unit,
        gfloat x,
        gfloat y
      )

| No description available.

`get_resolution`

    gboolean (* get_resolution) (
        GeglMetadata* metadata,
        GeglResolutionUnit* unit,
        gfloat* x,
        gfloat* y
      )

| No description available.

`iter_lookup`

    gboolean (* iter_lookup) (
        GeglMetadata* metadata,
        GeglMetadataIter* iter,
        const gchar* key
      )

| No description available.

`iter_init`

    void (* iter_init) (
        GeglMetadata* metadata,
        GeglMetadataIter* iter
      )

| No description available.

`iter_next`

    const gchar* (* iter_next) (
        GeglMetadata* metadata,
        GeglMetadataIter* iter
      )

| No description available.

`iter_set_value`

    gboolean (* iter_set_value) (
        GeglMetadata* metadata,
        GeglMetadataIter* iter,
        const GValue* value
      )

| No description available.

`iter_get_value`

    gboolean (* iter_get_value) (
        GeglMetadata* metadata,
        GeglMetadataIter* iter,
        GValue* value
      )

| No description available.

#### Virtual methods

###### Gegl.Metadata.get_resolution

Retrieve resolution from the application image metadata. Intended for use by the image file writer. If resolution is not supported by the application or if the operation fails `FALSE` is returned and the resolution values are not updated.

###### Gegl.Metadata.iter_get_value

Retrieve image file metadata from the application. Intended for use by the image file writer. If the operation fails it returns `FALSE` and `value` is not updated.

###### Gegl.Metadata.iter_init

Initialise an iterator to find all supported metadata keys.

###### Gegl.Metadata.iter_lookup

Look up the specified key and initialise an iterator to reference the associated metadata. The iterator is used in conjunction with `gegl_metadata_set_value()` and gegl_metadata_get_value(). Note that this iterator is not valid for gegl_metadata_iter_next().

###### Gegl.Metadata.iter_next

Move the iterator to the next metadata item.

###### Gegl.Metadata.iter_set_value

Set application data retrieved from image file’s metadata. Intended for use by the image file reader. If the operation fails it returns `FALSE` and `value` is ignored.

###### Gegl.Metadata.register_map

Set the name of the file module and pass an array of mappings from file-format specific metadata names to those used by Gegl. A GValue transformation function may be supplied, e.g. to parse or format timestamps.

###### Gegl.Metadata.set_resolution

Set resolution retrieved from image file’s metadata. Intended for use by the image file reader. If resolution is not supported by the application or if the operation fails `FALSE` is returned and the values are ignored.