libgimp, libgimpbase: add some documentation for new functions.

Just for a few of them just now as I needed these for my binding plug-in
tests, and without the proper annotations, these functions were
unavailable.
This commit is contained in:
Jehan 2019-08-01 11:57:17 +02:00
parent e7f041492a
commit 1627aacaa5
2 changed files with 58 additions and 0 deletions

View File

@ -152,6 +152,18 @@ gimp_procedure_finalize (GObject *object)
/* public functions */
/**
* gimp_procedure_new:
* @plug_in: a #GimpPlugIn.
* @name: the new procedure's name.
* @proc_type: the new procedure's #GimpPDBProcType.
* @run_func: (scope async): the run function for the new procedure.
*
* Creates a new procedure named @name which will call @run_func when
* invoked.
*
* Returns: a new #GimpProcedure.
**/
GimpProcedure *
gimp_procedure_new (GimpPlugIn *plug_in,
const gchar *name,
@ -362,6 +374,15 @@ gimp_procedure_get_menu_paths (GimpProcedure *procedure)
return procedure->priv->menu_paths;
}
/**
* gimp_procedure_add_argument:
* @procedure: the #GimpProcedure.
* @pspec: the argument specification.
*
* Add a new argument to @procedure according to @pspec specifications.
* The arguments will be ordered according to the call order to
* gimp_procedure_add_argument().
*/
void
gimp_procedure_add_argument (GimpProcedure *procedure,
GParamSpec *pspec)
@ -379,6 +400,15 @@ gimp_procedure_add_argument (GimpProcedure *procedure,
procedure->priv->n_args++;
}
/**
* gimp_procedure_add_return_value:
* @procedure: the #GimpProcedure.
* @pspec: the return value specification.
*
* Add a new return value to @procedure according to @pspec
* specifications. The returned values will be ordered according to the
* call order to * gimp_procedure_add_return_value().
*/
void
gimp_procedure_add_return_value (GimpProcedure *procedure,
GParamSpec *pspec)
@ -442,6 +472,20 @@ gimp_procedure_new_arguments (GimpProcedure *procedure)
return args;
}
/**
* gimp_procedure_new_return_values:
* @procedure: the #GimpProcedure.
* @status: the success status of the procedure run.
* @error: (nullable): an optional #GError. This parameter should be set
* if @status is either #GIMP_PDB_EXECUTION_ERROR or
* #GIMP_PDB_CALLING_ERROR.
*
* Format the expected return values from procedures, using the return
* values set with gimp_procedure_add_return_value().
*
* Returns: the expected #GimpValueArray as could be returned by a
* #GimpRunFunc.
*/
GimpValueArray *
gimp_procedure_new_return_values (GimpProcedure *procedure,
GimpPDBStatusType status,

View File

@ -88,6 +88,20 @@ gimp_param_int32_init (GParamSpec *pspec)
{
}
/**
* gimp_param_spec_int32:
* @name: new parameter's name.
* @nick: nick name for the parameter.
* @blurb: longer description of the parameter.
* @minimum: the minimum accepted value.
* @maximum: the maximum accepted value.
* @default_value: the default value.
* @flags: #GParamFlags for the new parameter.
*
* Create a new int32 #GParamSpec with the given specifications.
*
* Returns: (transfer full) (type GObject.ParamSpec): a new #GParamSpec.
*/
GParamSpec *
gimp_param_spec_int32 (const gchar *name,
const gchar *nick,