ThumbnailProcedure


Description:

[ CCode ( has_construct_function = false , type = "GimpProcedure*" ) ]
[ Version ( since = "3.0" ) ]
public ThumbnailProcedure (PlugIn plug_in, string name, PDBProcType proc_type, owned RunThumbnailFunc run_func)

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

See Procedure for information about proc_type.

ThumbnailProcedure is a Procedure subclass that makes it easier to write file thumbnail procedures.

It automatically adds the standard

(File, size)

arguments and the standard

(Image, image-width, image-height, ImageType, num-layers)

return value of a thumbnail procedure. It is possible to add additional arguments.

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

RunThumbnailFunc must truncate the returned ValueArray to the number of return values it actually uses.

Parameters:

plug_in

a PlugIn.

name

the new procedure's name.

proc_type

the new procedure's PDBProcType.

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.

Returns:

a new Procedure.