GimpFileProcedure

GimpFileProcedure

Functions

Object Hierarchy

    GObject
    ╰── GimpProcedure
        ╰── GimpFileProcedure
            ├── GimpLoadProcedure
            ╰── GimpSaveProcedure

Description

Functions

gimp_file_procedure_set_mime_types ()

void
gimp_file_procedure_set_mime_types (GimpFileProcedure *procedure,
                                    const gchar *mime_types);

Associates MIME types with a file handler procedure.

Registers MIME types for a file handler procedure. This allows GIMP to determine the MIME type of the file opened or saved using this procedure. It is recommended that only one MIME type is registered per file procedure; when registering more than one MIME type, GIMP will associate the first one with files opened or saved with this procedure.

Parameters

procedure

A GimpFileProcedure.

 

mime_types

A comma-separated list of MIME types, such as "image/jpeg".

 

Since: 3.0


gimp_file_procedure_get_mime_types ()

const gchar *
gimp_file_procedure_get_mime_types (GimpFileProcedure *procedure);

Parameters

procedure

A GimpFileProcedure.

 

Returns

The procedure's mime-type as set with gimp_file_procedure_set_mime_types().

Since: 3.0


gimp_file_procedure_set_extensions ()

void
gimp_file_procedure_set_extensions (GimpFileProcedure *procedure,
                                    const gchar *extensions);

Parameters

procedure

A GimpFileProcedure.

 

extensions

A comma separated list of extensions this procedure can handle (i.e. "jpg,jpeg").

 

Since: 3.0


gimp_file_procedure_get_extensions ()

const gchar *
gimp_file_procedure_get_extensions (GimpFileProcedure *procedure);

Parameters

procedure

A GimpFileProcedure.

 

Returns

The procedure's extensions as set with gimp_file_procedure_set_extensions().

Since: 3.0


gimp_file_procedure_set_prefixes ()

void
gimp_file_procedure_set_prefixes (GimpFileProcedure *procedure,
                                  const gchar *prefixes);

It should almost never be necessary to register prefixes with file procedures, because most sorts of URIs should be handled by GIO.

Parameters

procedure

A GimpFileProcedure.

 

prefixes

A comma separated list of prefixes this procedure can handle (i.e. "http:,ftp:").

 

Since: 3.0


gimp_file_procedure_get_prefixes ()

const gchar *
gimp_file_procedure_get_prefixes (GimpFileProcedure *procedure);

Parameters

procedure

A GimpFileProcedure.

 

Returns

The procedure's prefixes as set with gimp_file_procedure_set_prefixes().

Since: 3.0


gimp_file_procedure_set_magics ()

void
gimp_file_procedure_set_magics (GimpFileProcedure *procedure,
                                const gchar *magics);

Parameters

procedure

A GimpFileProcedure.

 

magics

A comma separated list of magic file information this procedure can handle (i.e. "0,string,GIF").

 

Since: 3.0


gimp_file_procedure_get_magics ()

const gchar *
gimp_file_procedure_get_magics (GimpFileProcedure *procedure);

Parameters

procedure

A GimpFileProcedure.

 

Returns

The procedure's magics as set with gimp_file_procedure_set_magics().

Since: 3.0


gimp_file_procedure_set_priority ()

void
gimp_file_procedure_set_priority (GimpFileProcedure *procedure,
                                  gint priority);

Sets the priority of a file handler procedure. When more than one procedure matches a given file, the procedure with the lowest priority is used; if more than one procedure has the lowest priority, it is unspecified which one of them is used. The default priority for file handler procedures is 0.

Parameters

procedure

A GimpFileProcedure.

 

priority

The procedure's priority.

 

Since: 3.0


gimp_file_procedure_get_priority ()

gint
gimp_file_procedure_get_priority (GimpFileProcedure *procedure);

Parameters

procedure

A GimpFileProcedure.

 

Returns

The procedure's priority as set with gimp_file_procedure_set_priority().

Since: 3.0


gimp_file_procedure_set_handles_remote ()

void
gimp_file_procedure_set_handles_remote
                               (GimpFileProcedure *procedure,
                                gboolean handles_remote);

Registers a file procedure as capable of handling arbitrary remote URIs via GIO.

When handles_remote is set to TRUE, the procedure will get a GFile passed that can point to a remote file.

When handles_remote is set to FALSE, the procedure will get a local GFile passed and can use g_file_get_path() to get to a filename that can be used with whatever non-GIO means of dealing with the file.

Parameters

procedure

A GimpFileProcedure.

 

handles_remote

The procedure's 'handles remote' flag.

 

Since: 3.0


gimp_file_procedure_get_handles_remote ()

gboolean
gimp_file_procedure_get_handles_remote
                               (GimpFileProcedure *procedure);

Parameters

procedure

A GimpFileProcedure.

 

Returns

The procedure's 'handles remote' flag as set with gimp_file_procedure_set_handles_remote().

Since: 3.0