### Interface

# Gegl Metadata

since: 0.4

#### Description

    interface Gegl.Metadata : GObject.Object

No description available.

Available since: 0.4

#### 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.

since: 0.4

###### 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.

since: 0.4

###### gegl_metadata_iter_init

Initialise an iterator to find all supported metadata keys.

since: 0.4

###### 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().

since: 0.4

###### gegl_metadata_iter_next

Move the iterator to the next metadata item.

since: 0.4

###### 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.

since: 0.4

###### 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.

since: 0.4

###### 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.

since: 0.4

###### 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.

since: 0.4

#### 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
      )
| See gegl_metadata_register_map(). If called with a NULL map, the registration is deleted.
`set_resolution` |
    gboolean (* set_resolution) (
        GeglMetadata* metadata,
        GeglResolutionUnit unit,
        gfloat x,
        gfloat y
      )
| See gegl_metadata_set_resolution().
`get_resolution` |
    gboolean (* get_resolution) (
        GeglMetadata* metadata,
        GeglResolutionUnit* unit,
        gfloat* x,
        gfloat* y
      )
| See gegl_metadata_get_resolution().
`iter_lookup` |
    gboolean (* iter_lookup) (
        GeglMetadata* metadata,
        GeglMetadataIter* iter,
        const gchar* key
      )
| See gegl_metadata_iter_lookup().
`iter_init` |
    void (* iter_init) (
        GeglMetadata* metadata,
        GeglMetadataIter* iter
      )
| See gegl_metadata_iter_init().
`iter_next` |
    const gchar* (* iter_next) (
        GeglMetadata* metadata,
        GeglMetadataIter* iter
      )
| See gegl_metadata_iter_next().
`iter_set_value` |
    gboolean (* iter_set_value) (
        GeglMetadata* metadata,
        GeglMetadataIter* iter,
        const GValue* value
      )
| See gegl_metadata_iter_set_value().
`iter_get_value` |
    gboolean (* iter_get_value) (
        GeglMetadata* metadata,
        GeglMetadataIter* iter,
        GValue* value
      )
| See gegl_metadata_iter_get_value().

#### 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.

since: 0.4

###### 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.

since: 0.4

###### Gegl.Metadata.iter_init

Initialise an iterator to find all supported metadata keys.

since: 0.4

###### 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().

since: 0.4

###### Gegl.Metadata.iter_next

Move the iterator to the next metadata item.

since: 0.4

###### 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.

since: 0.4

###### 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.

since: 0.4

###### 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.

since: 0.4