Constructor

GimpExportProcedurenew

since: 3.0

Declaration [src]

GimpProcedure*
gimp_export_procedure_new (
  GimpPlugIn* plug_in,
  const gchar* name,
  GimpPDBProcType proc_type,
  gboolean export_metadata,
  GimpRunExportFunc run_func,
  gpointer run_data,
  GDestroyNotify run_data_destroy
)

Description [src]

Creates a new export procedure named name which will call run_func when invoked.

See gimp_procedure_new() for information about proc_type.

GimpExportProcedure is a GimpProcedure subclass that makes it easier to write file export procedures.

It automatically adds the standard

(GimpRunMode, GimpImage, GFile, GimpExportOptions)

arguments of an export procedure. It is possible to add additional arguments.

When invoked via gimp_procedure_run(), it unpacks these standard arguments and calls run_func which is a GimpRunExportFunc. The GimpProcedureConfig of GimpRunExportFunc only contains additionally added arguments.

If export_metadata is TRUE, then the class will also handle the metadata export if the format is supported by our backend. This requires you to also set appropriate MimeType with gimp_file_procedure_set_mime_types().

Available since: 3.0

Parameters

plug_in

Type: GimpPlugIn

A GimpPlugIn.

The data is owned by the caller of the function.
name

Type: const gchar*

The new procedure’s name.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
proc_type

Type: GimpPDBProcType

The new procedure’s GimpPDBProcType.

export_metadata

Type: gboolean

Whether GIMP should handle metadata exporting.

run_func

Type: GimpRunExportFunc

The run function for the new procedure.

run_data

Type: gpointer

User data passed to run_func.

The argument can be NULL.
The data is owned by the caller of the function.
run_data_destroy

Type: GDestroyNotify

Free function for run_data, or NULL.

The argument can be NULL.

Return value

Type: GimpProcedure

A new GimpProcedure.

The caller of the function takes ownership of the data, and is responsible for freeing it.