Gimp.BatchProcedure.new

function new(plug_in: Gimp.PlugIn, name: String, interpreter_name: String, proc_type: Gimp.PDBProcType, run_func: Gimp.BatchFunc): Gimp.Procedure {
    // Gjs wrapper for gimp_batch_procedure_new()
}
  

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

See Gimp.Procedure.new for information about proc_type.

Gimp.BatchProcedure is a Gimp.Procedure subclass that makes it easier to write batch interpreter procedures.

It automatically adds the standard

(Gimp.RunMode, #gchar)

arguments of a batch procedure. It is possible to add additional arguments.

When invoked via Gimp.Procedure.prototype.run, it unpacks these standard arguments and calls run_func which is a Gimp.BatchFunc. The "args" Gimp.ValueArray of Gimp.RunSaveFunc only contains additionally added arguments.

Since 3.0

plug_in

a Gimp.PlugIn.

name

the new procedure's name.

interpreter_name

the public-facing name, e.g. "Python 3".

proc_type

the new procedure's Gimp.PDBProcType.

run_func

the run function for the new procedure.

Returns

a new Gimp.Procedure.