GimpSaveProcedure

GimpSaveProcedure

Functions

GimpValueArray * (*GimpRunSaveFunc) ()
GimpProcedure * gimp_save_procedure_new ()

Object Hierarchy

    GObject
    ╰── GimpProcedure
        ╰── GimpFileProcedure
            ╰── GimpSaveProcedure

Description

Functions

GimpRunSaveFunc ()

GimpValueArray *
(*GimpRunSaveFunc) (GimpProcedure *procedure,
                    GimpRunMode run_mode,
                    GimpImage *image,
                    gint n_drawables,
                    GimpDrawable **drawables,
                    GFile *file,
                    const GimpValueArray *args,
                    gpointer run_data);

The save function is run during the lifetime of the GIMP session, each time a plug-in save procedure is called.

Parameters

procedure

the GimpProcedure that runs.

 

run_mode

the GimpRunMode.

 

image

the image to save.

 

n_drawables

the number of drawables to save.

 

drawables

the drawables to save.

 

file

the GFile to save to.

 

args

the procedure 's remaining arguments.

 

run_data

the run_data given in gimp_save_procedure_new().

[closure]

Returns

the procedure 's return values.

[transfer full]

Since: 3.0


gimp_save_procedure_new ()

GimpProcedure *
gimp_save_procedure_new (GimpPlugIn *plug_in,
                         const gchar *name,
                         GimpPDBProcType proc_type,
                         GimpRunSaveFunc run_func,
                         gpointer run_data,
                         GDestroyNotify run_data_destroy);

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

See gimp_procedure_new() for information about proc_type .

GimpSaveProcedure is a GimpProcedure subclass that makes it easier to write file save procedures.

It automatically adds the standard

(GimpRunMode, GimpImage, GimpDrawable, GFile)

arguments of a save 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 GimpRunSaveFunc. The "args" GimpValueArray of GimpRunSaveFunc only contains additionally added arguments.

Parameters

plug_in

a GimpPlugIn.

 

name

the new procedure's name.

 

proc_type

the new procedure's GimpPDBProcType.

 

run_func

the run function for the new procedure.

 

run_data

user data passed to run_func .

 

run_data_destroy

free function for run_data , or NULL.

[nullable]

Returns

a new GimpProcedure.

Since: 3.0