[gimp] libgimp: add object array convenience macros to gimpprocedure-params.h
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimp: add object array convenience macros to gimpprocedure-params.h
- Date: Thu, 5 Sep 2019 11:01:48 +0000 (UTC)
commit b4f698e78c5898083cd0ce8725a3b61187f752bb
Author: Michael Natterer <mitch gimp org>
Date: Thu Sep 5 11:40:29 2019 +0200
libgimp: add object array convenience macros to gimpprocedure-params.h
libgimp/gimpprocedure-params.h | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
---
diff --git a/libgimp/gimpprocedure-params.h b/libgimp/gimpprocedure-params.h
index 5d40e6d71a..f5d08e2af2 100644
--- a/libgimp/gimpprocedure-params.h
+++ b/libgimp/gimpprocedure-params.h
@@ -430,6 +430,33 @@ G_BEGIN_DECLS
gimp_value_take_rgb_array (gimp_value_array_index (args, n), value, length)
+/* object array */
+
+#define GIMP_PROC_ARG_OBJECT_ARRAY(class, name, nick, blurb, object_type, flags) \
+ gimp_procedure_add_argument (procedure,\
+ gimp_param_spec_object_array (name, nick, blurb,\
+ object_type, flags))
+
+#define GIMP_PROC_VAL_OBJECT_ARRAY(class, name, nick, blurb, object_type, flags) \
+ gimp_procedure_add_return_value (procedure,\
+ gimp_param_spec_string_array (name, nick, blurb,\
+ object_type, flags))
+
+#define GIMP_VALUES_GET_OBJECT_ARRAY(args, n) \
+ (gpointer) gimp_value_get_object_array (gimp_value_array_index (args, n))
+
+#define GIMP_VALUES_DUP_OBJECT_ARRAY(args, n) \
+ (gpointer) gimp_value_dup_object_array (gimp_value_array_index (args, n))
+
+#define GIMP_VALUES_SET_OBJECT_ARRAY(args, n, value, length) \
+ gimp_value_set_object_array (gimp_value_array_index (args, n),\
+ (gpointer) value, length)
+
+#define GIMP_VALUES_TAKE_OBJECT_ARRAY(args, n, value, length) \
+ gimp_value_take_object_array (gimp_value_array_index (args, n),\
+ (gpointer) value, length)
+
+
/* display */
#define GIMP_PROC_ARG_DISPLAY(class, name, nick, blurb, none_ok, flags) \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]