[gimp] libgimp, libgimpbase: add some documentation for new functions.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimp, libgimpbase: add some documentation for new functions.
- Date: Thu, 1 Aug 2019 10:24:21 +0000 (UTC)
commit 1627aacaa5451a60f5e9623ea193db1adf681300
Author: Jehan <jehan girinstud io>
Date: Thu Aug 1 11:57:17 2019 +0200
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.
libgimp/gimpprocedure.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
libgimpbase/gimpparamspecs.c | 14 ++++++++++++++
2 files changed, 58 insertions(+)
---
diff --git a/libgimp/gimpprocedure.c b/libgimp/gimpprocedure.c
index 02e6623f8b..207150a86d 100644
--- a/libgimp/gimpprocedure.c
+++ b/libgimp/gimpprocedure.c
@@ -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,
diff --git a/libgimpbase/gimpparamspecs.c b/libgimpbase/gimpparamspecs.c
index eae571153b..81f57e44de 100644
--- a/libgimpbase/gimpparamspecs.c
+++ b/libgimpbase/gimpparamspecs.c
@@ -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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]