Constructor
GimpThumbnailProcedurenew
Declaration [src]
GimpProcedure*
gimp_thumbnail_procedure_new (
GimpPlugIn* plug_in,
const gchar* name,
GimpPDBProcType proc_type,
GimpRunThumbnailFunc run_func,
gpointer run_data,
GDestroyNotify run_data_destroy
)
Description [src]
Creates a new thumbnail procedure named name
which will call run_func
when invoked.
See gimp_procedure_new()
for information about proc_type
.
GimpThumbnailProcedure
is a GimpProcedure
subclass that makes it easier
to write file thumbnail procedures.
It automatically adds the standard
(GFile
, size)
arguments and the standard
(GimpImage
, image-width, image-height, GimpImageType
, num-layers)
return value of a thumbnail 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 GimpRunThumbnailFunc
. The
“args” GimpValueArray
of GimpRunThumbnailFunc
only contains
additionally added arguments.
GimpRunThumbnailFunc
must gimp_value_array_truncate()
the returned
GimpValueArray
to the number of return values it actually uses.
Available since: | 3.0 |
Parameters
plug_in |
GimpPlugIn |
A |
|
The data is owned by the caller of the function. | |
name |
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 |
GimpPDBProcType |
The new procedure’s |
|
run_func |
GimpRunThumbnailFunc |
The run function for the new procedure. |
|
run_data |
gpointer |
User data passed to |
|
The argument can be NULL . | |
The data is owned by the caller of the function. | |
run_data_destroy |
GDestroyNotify |
Free function for |
|
The argument can be NULL . |
Return value
Returns: | GimpProcedure |
A new |
|
The caller of the function takes ownership of the data, and is responsible for freeing it. |