Gimp.ThumbnailProcedure.new
function new(plug_in: Gimp.PlugIn, name: String, proc_type: Gimp.PDBProcType, run_func: Gimp.RunThumbnailFunc): Gimp.Procedure {
// Gjs wrapper for gimp_thumbnail_procedure_new()
}
Creates a new thumbnail procedure named name which will call run_func when invoked.
See Gimp.Procedure.new for information about proc_type.
Gimp.ThumbnailProcedure is a Gimp.Procedure subclass that makes it easier to write file thumbnail procedures.
It automatically adds the standard
(Gio.File, size)
arguments and the standard
(Gimp.Image, image-width, image-height, Gimp.ImageType, num-layers)
return value of a thumbnail 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.RunThumbnailFunc. The "args" Gimp.ValueArray of Gimp.RunThumbnailFunc only contains additionally added arguments.
Gimp.RunThumbnailFunc must Gimp.ValueArray.prototype.truncate the returned Gimp.ValueArray to the number of return values it actually uses.
Since 3.0
- plug_in
a Gimp.PlugIn.
- name
the new procedure's name.
- proc_type
the new procedure's Gimp.PDBProcType.
- run_func
the run function for the new procedure.
- Returns
a new Gimp.Procedure.