GimpThumbnailProcedure

GimpThumbnailProcedure

Functions

Object Hierarchy

    GObject
    ╰── GimpProcedure
        ╰── GimpThumbnailProcedure

Description

Functions

GimpRunThumbnailFunc ()

GimpValueArray *
(*GimpRunThumbnailFunc) (GimpProcedure *procedure,
                         GFile *file,
                         gint size,
                         const GimpValueArray *args,
                         gpointer run_data);

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

Parameters

procedure

the GimpProcedure that runs.

 

file

the GFile to load the thumbnail from.

 

size

the requested thumbnail size.

 

args

the procedure 's remaining arguments.

 

run_data

the run_data given in gimp_thumbnail_procedure_new().

[closure]

Returns

the procedure 's return values.

[transfer full]

Since: 3.0


gimp_thumbnail_procedure_new ()

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

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.

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

Types and Values