libgimp: add and fix docs, reorder GimpParamData and remove d_boundary

This commit is contained in:
Michael Natterer 2019-08-11 15:35:55 +02:00
parent 7fbf33869c
commit 6622cf0dc4
4 changed files with 70 additions and 9 deletions

View file

@ -88,6 +88,12 @@ struct _GimpPlugInInfo
GimpRunProc run_proc;
};
/**
* GimpParamDef:
* @type: the parameter's type.
* @name: the parameter's name.
* @description: the parameter's desctiption.
**/
struct _GimpParamDef
{
GimpPDBArgType type;
@ -95,6 +101,34 @@ struct _GimpParamDef
gchar *description;
};
/**
* GimpParamData:
* @d_int32: a 32-bit integer.
* @d_int16: a 16-bit integer.
* @d_int8: an 8-bit unsigned integer.
* @d_float: a double.
* @d_string: a string.
* @d_color: a #GimpRGB.
* @d_int32array: an array of int32.
* @d_int16array: an array of int16.
* @d_int8array: an array of int8.
* @d_floatarray: an array of floats.
* @d_stringarray: an array of strings.
* @d_colorarray: an array of colors.
* @d_display: a display id.
* @d_image: an image id.
* @d_item: an item id.
* @d_drawable: a drawable id.
* @d_layer: a layer id.
* @d_channel: a channel id.
* @d_layer_mask: a layer mask id.
* @d_selection: a selection id.
* @d_vectors: a vectors id.
* @d_unit: a GimpUnit.
* @d_parasite: a GimpParasite.
* @d_tattoo: a tattoo.
* @d_status: a return status.
**/
union _GimpParamData
{
gint32 d_int32;
@ -102,22 +136,21 @@ union _GimpParamData
guint8 d_int8;
gdouble d_float;
gchar *d_string;
GimpRGB d_color;
gint32 *d_int32array;
gint16 *d_int16array;
guint8 *d_int8array;
gdouble *d_floatarray;
gchar **d_stringarray;
GimpRGB *d_colorarray;
GimpRGB d_color;
gint32 d_display;
gint32 d_image;
gint32 d_item;
gint32 d_layer;
gint32 d_layer_mask;
gint32 d_channel;
gint32 d_drawable;
gint32 d_layer;
gint32 d_channel;
gint32 d_layer_mask;
gint32 d_selection;
gint32 d_boundary;
gint32 d_vectors;
gint32 d_unit;
GimpParasite d_parasite;
@ -125,6 +158,11 @@ union _GimpParamData
GimpPDBStatusType d_status;
};
/**
* GimpParam:
* @type: the parameter's type.
* @data: the parameter's data.
**/
struct _GimpParam
{
GimpPDBArgType type;

View file

@ -225,7 +225,11 @@ gimp_load_procedure_run (GimpProcedure *procedure,
*
* (run-mode, uri, raw-uri)
*
* arguments of a load procedure. It is possible to add additional
* arguments and the standard
*
* (image-id)
*
* return value of a load procedure. It is possible to add additional
* arguments.
*
* When invoked via gimp_procedure_run(), it unpacks these standard
@ -332,7 +336,7 @@ gimp_load_procedure_set_thumbnail_loader (GimpLoadProcedure *procedure,
* @procedure: A #GimpLoadProcedure.
*
* Returns: The procedure's thumbnail loader procedure as set with
* gimp_load_procedure_set_thumbnail_procedure().
* gimp_load_procedure_set_thumbnail_loader().
*
* Since: 3.0
**/

View file

@ -64,8 +64,10 @@ static const gdouble gimp_progress_step = (1.0 / 256.0);
/**
* gimp_progress_install_vtable:
* @vtable: a pointer to a @GimpProgressVtable.
* @user_data: a pointer that is passed as user_data to all vtable functions.
* @vtable: a pointer to a @GimpProgressVtable.
* @user_data: a pointer that is passed as user_data to all vtable
* functions.
* @user_data_destroy: (nullable): destroy function for @user_data, or %NULL.
*
* Returns: the name of the temporary procedure that's been installed
*

View file

@ -30,6 +30,23 @@ G_BEGIN_DECLS
typedef struct _GimpProgressVtable GimpProgressVtable;
/**
* GimpProgressVtable:
* @start: starts the progress.
* @end: ends the progress.
* @set_text: sets a new text on the progress.
* @set_value: sets a new percentage on the progress.
* @pulse: makes the progress pulse.
* @get_window: returns the ID of the window where the progress is displayed.
* @_gimp_reserved1: reserved pointer for future expansion.
* @_gimp_reserved2: reserved pointer for future expansion.
* @_gimp_reserved3: reserved pointer for future expansion.
* @_gimp_reserved4: reserved pointer for future expansion.
* @_gimp_reserved5: reserved pointer for future expansion.
* @_gimp_reserved6: reserved pointer for future expansion.
* @_gimp_reserved7: reserved pointer for future expansion.
* @_gimp_reserved8: reserved pointer for future expansion.
**/
struct _GimpProgressVtable
{
void (* start) (const gchar *message,