2006-12-09 21:33:38 +00:00
|
|
|
# GIMP - The GNU Image Manipulation Program
|
2003-07-03 00:47:26 +00:00
|
|
|
# Copyright (C) 1998-2003 Manish Singh <yosh@gimp.org>
|
1998-10-24 05:19:30 +00:00
|
|
|
|
2009-01-17 22:28:01 +00:00
|
|
|
# This program is free software: you can redistribute it and/or modify
|
1998-10-24 05:19:30 +00:00
|
|
|
# it under the terms of the GNU General Public License as published by
|
2009-01-17 22:28:01 +00:00
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
1998-10-24 05:19:30 +00:00
|
|
|
# (at your option) any later version.
|
|
|
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2018-07-11 23:27:07 +02:00
|
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
1998-10-24 05:19:30 +00:00
|
|
|
|
|
|
|
package Gimp::CodeGen::pdb;
|
|
|
|
|
|
|
|
%arg_types = (
|
2024-10-25 02:10:57 +02:00
|
|
|
size => { name => 'SIZE',
|
|
|
|
gtype => 'G_TYPE_SIZE',
|
|
|
|
type => 'gsize ',
|
|
|
|
const_type => 'gsize ',
|
|
|
|
init_value => '0',
|
|
|
|
get_value_func => '$var = g_value_get_size ($value)',
|
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_INT ($value)',
|
|
|
|
set_value_func => 'g_value_set_size ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_size ($value, $var)' },
|
|
|
|
|
2019-07-30 10:39:56 +02:00
|
|
|
int32 => { name => 'INT32',
|
2019-08-15 14:04:56 +02:00
|
|
|
gtype => 'G_TYPE_INT',
|
|
|
|
type => 'gint ',
|
|
|
|
const_type => 'gint ',
|
2019-07-30 10:39:56 +02:00
|
|
|
init_value => '0',
|
|
|
|
get_value_func => '$var = g_value_get_int ($value)',
|
2019-09-04 02:49:33 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_INT ($value)',
|
2019-07-30 10:39:56 +02:00
|
|
|
set_value_func => 'g_value_set_int ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_int ($value, $var)' },
|
|
|
|
|
app, libgimp*, pdb, plug-ins: rename various public API name s/float/double/.
Several types functions were using the wording "float" historically to
mean double-precision, e.g. the float array type (which was in fact a
double array). Or the scanner function gimp_scanner_parse_float() was in
fact returning a double value. What if we wanted someday to actually add
float (usually this naming means in C the single-precision IEEE 754
floating point representation) support? How would we name this?
Now technically it's not entirely wrong (a double is still a floating
point). So I've been wondering if that is because maybe we never planned
to have float and double precision may be good enough for all usage in a
plug-in API (which doesn't have to be as generic so the higher precision
is enough)? But how can we be sure? Also we already had some functions
using the wording double (e.g. gimp_procedure_add_double_argument()), so
let's just go the safe route and use the accurate wording.
The additional change in PDB is internal, but there too, I was also
finding very confusing that we were naming double-precision float as
'float' type. So I took the opportunity to update this. It doesn't
change any signature.
In fact the whole commit doesn't change any type or code logic, only
naming, except for one bug fix in the middle which I encountered while
renaming: in gimp_scanner_parse_deprecated_color(), I discovered a
hidden bug in scanning (color-hsv*) values, which was mistakenly using a
double type for an array of float.
2024-11-02 14:03:37 +01:00
|
|
|
double => { name => 'DOUBLE',
|
2019-07-30 10:39:56 +02:00
|
|
|
gtype => 'G_TYPE_DOUBLE',
|
|
|
|
type => 'gdouble ',
|
|
|
|
const_type => 'gdouble ',
|
|
|
|
init_value => '0.0',
|
|
|
|
get_value_func => '$var = g_value_get_double ($value)',
|
2019-09-04 02:49:33 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_DOUBLE ($value)',
|
2019-07-30 10:39:56 +02:00
|
|
|
set_value_func => 'g_value_set_double ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_double ($value, $var)' },
|
|
|
|
|
|
|
|
string => { name => 'STRING',
|
|
|
|
gtype => 'G_TYPE_STRING',
|
|
|
|
type => 'gchar *',
|
|
|
|
const_type => 'const gchar *',
|
|
|
|
init_value => 'NULL',
|
2019-07-31 18:58:52 +02:00
|
|
|
out_annotate => '(transfer full)',
|
2019-07-30 10:39:56 +02:00
|
|
|
get_value_func => '$var = g_value_get_string ($value)',
|
2019-09-04 02:49:33 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_DUP_STRING ($value)',
|
2019-07-30 10:39:56 +02:00
|
|
|
set_value_func => 'g_value_set_string ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_string ($value, $var)' },
|
|
|
|
|
2020-12-23 21:15:43 +01:00
|
|
|
strv => { name => 'STRV',
|
|
|
|
gtype => 'G_TYPE_STRV',
|
|
|
|
type => 'gchar **',
|
|
|
|
const_type => 'const gchar **',
|
|
|
|
init_value => 'NULL',
|
|
|
|
in_annotate => '(array zero-terminated=1)',
|
|
|
|
out_annotate => '(array zero-terminated=1) (transfer full)',
|
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
|
|
|
dup_value_func => '$var = GIMP_VALUES_DUP_STRV ($value)',
|
|
|
|
set_value_func => 'g_value_set_boxed ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_boxed ($value, $var)' },
|
|
|
|
|
2023-05-23 23:37:46 +02:00
|
|
|
bytes => { name => 'BYTES',
|
|
|
|
gtype => 'G_TYPE_BYTES',
|
|
|
|
type => 'GBytes *',
|
|
|
|
const_type => 'GBytes *',
|
|
|
|
init_value => 'NULL',
|
|
|
|
out_annotate => '(transfer full)',
|
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
|
|
|
dup_value_func => '$var = GIMP_VALUES_DUP_BYTES ($value)',
|
|
|
|
set_value_func => 'g_value_set_boxed ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_boxed ($value, $var)' },
|
|
|
|
|
2019-07-30 10:39:56 +02:00
|
|
|
int32array => { name => 'INT32ARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_INT32_ARRAY',
|
|
|
|
type => 'gint32 *',
|
|
|
|
const_type => 'const gint32 *',
|
|
|
|
array => 1,
|
|
|
|
init_value => 'NULL',
|
2019-07-31 18:58:52 +02:00
|
|
|
in_annotate => '(element-type gint32)',
|
|
|
|
out_annotate => '(element-type gint32) (transfer full)',
|
2024-10-28 10:46:17 +01:00
|
|
|
get_value_func => '$var = gimp_value_get_int32_array ($value, &$var_len)',
|
|
|
|
dup_value_func => '$var = GIMP_VALUES_DUP_INT32_ARRAY ($value, $var_len)',
|
2019-07-30 10:39:56 +02:00
|
|
|
set_value_func => 'gimp_value_set_int32_array ($value, $var, $var_len)',
|
|
|
|
take_value_func => 'gimp_value_take_int32_array ($value, $var, $var_len)' },
|
|
|
|
|
app, libgimp*, pdb, plug-ins: rename various public API name s/float/double/.
Several types functions were using the wording "float" historically to
mean double-precision, e.g. the float array type (which was in fact a
double array). Or the scanner function gimp_scanner_parse_float() was in
fact returning a double value. What if we wanted someday to actually add
float (usually this naming means in C the single-precision IEEE 754
floating point representation) support? How would we name this?
Now technically it's not entirely wrong (a double is still a floating
point). So I've been wondering if that is because maybe we never planned
to have float and double precision may be good enough for all usage in a
plug-in API (which doesn't have to be as generic so the higher precision
is enough)? But how can we be sure? Also we already had some functions
using the wording double (e.g. gimp_procedure_add_double_argument()), so
let's just go the safe route and use the accurate wording.
The additional change in PDB is internal, but there too, I was also
finding very confusing that we were naming double-precision float as
'float' type. So I took the opportunity to update this. It doesn't
change any signature.
In fact the whole commit doesn't change any type or code logic, only
naming, except for one bug fix in the middle which I encountered while
renaming: in gimp_scanner_parse_deprecated_color(), I discovered a
hidden bug in scanning (color-hsv*) values, which was mistakenly using a
double type for an array of float.
2024-11-02 14:03:37 +01:00
|
|
|
doublearray => { name => 'DOUBLEARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_DOUBLE_ARRAY',
|
2019-07-30 10:39:56 +02:00
|
|
|
type => 'gdouble *',
|
|
|
|
const_type => 'const gdouble *',
|
|
|
|
array => 1,
|
|
|
|
init_value => 'NULL',
|
2019-07-31 18:58:52 +02:00
|
|
|
in_annotate => '(element-type gdouble)',
|
|
|
|
out_annotate => '(element-type gdouble) (transfer full)',
|
app, libgimp*, pdb, plug-ins: rename various public API name s/float/double/.
Several types functions were using the wording "float" historically to
mean double-precision, e.g. the float array type (which was in fact a
double array). Or the scanner function gimp_scanner_parse_float() was in
fact returning a double value. What if we wanted someday to actually add
float (usually this naming means in C the single-precision IEEE 754
floating point representation) support? How would we name this?
Now technically it's not entirely wrong (a double is still a floating
point). So I've been wondering if that is because maybe we never planned
to have float and double precision may be good enough for all usage in a
plug-in API (which doesn't have to be as generic so the higher precision
is enough)? But how can we be sure? Also we already had some functions
using the wording double (e.g. gimp_procedure_add_double_argument()), so
let's just go the safe route and use the accurate wording.
The additional change in PDB is internal, but there too, I was also
finding very confusing that we were naming double-precision float as
'float' type. So I took the opportunity to update this. It doesn't
change any signature.
In fact the whole commit doesn't change any type or code logic, only
naming, except for one bug fix in the middle which I encountered while
renaming: in gimp_scanner_parse_deprecated_color(), I discovered a
hidden bug in scanning (color-hsv*) values, which was mistakenly using a
double type for an array of float.
2024-11-02 14:03:37 +01:00
|
|
|
get_value_func => '$var = gimp_value_get_double_array ($value, &$var_len)',
|
|
|
|
dup_value_func => '$var = GIMP_VALUES_DUP_DOUBLE_ARRAY ($value, $var_len)',
|
|
|
|
set_value_func => 'gimp_value_set_double_array ($value, $var, $var_len)',
|
|
|
|
take_value_func => 'gimp_value_take_double_array ($value, $var, $var_len)' },
|
2019-07-30 10:39:56 +02:00
|
|
|
|
2023-12-27 01:07:19 +09:00
|
|
|
colorarray => { name => 'COLOR_ARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_COLOR_ARRAY',
|
|
|
|
type => 'GeglColor **',
|
|
|
|
const_type => 'const GeglColor **',
|
2019-07-30 10:39:56 +02:00
|
|
|
init_value => 'NULL',
|
2023-12-27 01:07:19 +09:00
|
|
|
in_annotate => '(array zero-terminated=1)',
|
|
|
|
out_annotate => '(array zero-terminated=1) (transfer full)',
|
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
|
|
|
dup_value_func => '$var = gimp_color_array_copy (g_value_get_boxed (gimp_value_array_index ($value)))',
|
|
|
|
set_value_func => 'g_value_set_boxed ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_boxed ($value, $var)' },
|
2019-07-30 10:39:56 +02:00
|
|
|
|
2019-09-05 12:57:43 +02:00
|
|
|
imagearray => { name => 'IMAGEARRAY',
|
2024-10-22 13:10:06 +02:00
|
|
|
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
2019-09-05 12:57:43 +02:00
|
|
|
type => 'GimpImage **',
|
|
|
|
const_type => 'const GimpImage **',
|
2025-07-12 18:54:20 +02:00
|
|
|
app_const_type => 'GimpImage **',
|
2019-09-05 12:57:43 +02:00
|
|
|
init_value => 'NULL',
|
2024-10-22 13:10:06 +02:00
|
|
|
in_annotate => '(element-type GimpImage) (array zero-terminated=1)',
|
|
|
|
out_annotate => '(element-type GimpImage) (array zero-terminated=1) (transfer container)',
|
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
|
|
|
dup_value_func => '$var = g_value_dup_boxed (gimp_value_array_index ($value))',
|
|
|
|
set_value_func => 'g_value_set_boxed ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_boxed ($value, $var)' },
|
2019-09-05 12:57:43 +02:00
|
|
|
|
|
|
|
itemarray => { name => 'ITEMARRAY',
|
2024-10-21 23:57:10 +02:00
|
|
|
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
2019-09-05 12:57:43 +02:00
|
|
|
type => 'GimpItem **',
|
|
|
|
const_type => 'const GimpItem **',
|
2025-07-12 18:54:20 +02:00
|
|
|
app_const_type => 'GimpItem **',
|
2019-09-05 12:57:43 +02:00
|
|
|
init_value => 'NULL',
|
2024-10-21 23:57:10 +02:00
|
|
|
in_annotate => '(element-type GimpItem) (array zero-terminated=1)',
|
|
|
|
out_annotate => '(element-type GimpItem) (array zero-terminated=1) (transfer container)',
|
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
|
|
|
dup_value_func => '$var = g_value_dup_boxed (gimp_value_array_index ($value))',
|
|
|
|
set_value_func => 'g_value_set_boxed ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_boxed ($value, $var)' },
|
2019-09-05 12:57:43 +02:00
|
|
|
|
2024-10-21 21:59:26 +02:00
|
|
|
drawablearray => { name => 'DRAWABLEARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
|
|
|
type => 'GimpDrawable **',
|
|
|
|
const_type => 'const GimpDrawable **',
|
2025-07-12 18:54:20 +02:00
|
|
|
app_const_type => 'GimpDrawable **',
|
2024-10-21 21:59:26 +02:00
|
|
|
init_value => 'NULL',
|
|
|
|
in_annotate => '(element-type GimpDrawable) (array zero-terminated=1)',
|
|
|
|
out_annotate => '(element-type GimpDrawable) (array zero-terminated=1) (transfer container)',
|
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
|
|
|
dup_value_func => '$var = g_value_dup_boxed (gimp_value_array_index ($value))',
|
|
|
|
set_value_func => 'g_value_set_boxed ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_boxed ($value, $var)' },
|
|
|
|
|
2019-09-05 12:57:43 +02:00
|
|
|
layerarray => { name => 'LAYERARRAY',
|
2024-10-22 01:47:45 +02:00
|
|
|
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
2019-09-05 12:57:43 +02:00
|
|
|
type => 'GimpLayer **',
|
|
|
|
const_type => 'const GimpLayer **',
|
2025-07-12 18:54:20 +02:00
|
|
|
app_const_type => 'GimpLayer **',
|
2019-09-05 12:57:43 +02:00
|
|
|
init_value => 'NULL',
|
2024-10-22 01:47:45 +02:00
|
|
|
in_annotate => '(element-type GimpLayer) (array zero-terminated=1)',
|
|
|
|
out_annotate => '(element-type GimpLayer) (array zero-terminated=1) (transfer container)',
|
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
|
|
|
dup_value_func => '$var = g_value_dup_boxed (gimp_value_array_index ($value))',
|
|
|
|
set_value_func => 'g_value_set_boxed ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_boxed ($value, $var)' },
|
2019-09-05 12:57:43 +02:00
|
|
|
|
2025-07-12 18:54:20 +02:00
|
|
|
channelarray => { name => 'CHANNELARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
|
|
|
type => 'GimpChannel **',
|
|
|
|
const_type => 'const GimpChannel **',
|
|
|
|
app_const_type => 'GimpChannel **',
|
|
|
|
init_value => 'NULL',
|
|
|
|
in_annotate => '(element-type GimpChannel) (array zero-terminated=1)',
|
2024-10-22 02:09:58 +02:00
|
|
|
out_annotate => '(element-type GimpChannel) (array zero-terminated=1) (transfer container)',
|
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
|
|
|
dup_value_func => '$var = g_value_dup_boxed (gimp_value_array_index ($value))',
|
|
|
|
set_value_func => 'g_value_set_boxed ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_boxed ($value, $var)' },
|
2019-09-05 12:57:43 +02:00
|
|
|
|
2024-07-12 06:16:25 +00:00
|
|
|
patharray => { name => 'PATHARRAY',
|
2025-07-12 18:54:20 +02:00
|
|
|
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
|
|
|
type => 'GimpPath **',
|
|
|
|
const_type => 'const GimpPath **',
|
|
|
|
app_const_type => 'GimpPath **',
|
|
|
|
init_value => 'NULL',
|
|
|
|
in_annotate => '(element-type GimpPath) (array zero-terminated=1)',
|
2024-10-22 12:20:30 +02:00
|
|
|
out_annotate => '(element-type GimpPath) (array zero-terminated=1) (transfer container)',
|
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
|
|
|
dup_value_func => '$var = g_value_dup_boxed (gimp_value_array_index ($value))',
|
|
|
|
set_value_func => 'g_value_set_boxed ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_boxed ($value, $var)' },
|
2019-09-05 12:57:43 +02:00
|
|
|
|
2024-11-25 04:38:39 +09:00
|
|
|
filterarray => { name => 'FILTERARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
|
|
|
type => 'GimpDrawableFilter **',
|
|
|
|
const_type => 'const GimpDrawableFilter **',
|
2025-07-12 18:54:20 +02:00
|
|
|
app_const_type => 'GimpDrawableFilter **',
|
2024-11-25 04:38:39 +09:00
|
|
|
init_value => 'NULL',
|
|
|
|
in_annotate => '(element-type GimpDrawableFilter) (array zero-terminated=1)',
|
|
|
|
out_annotate => '(element-type GimpDrawableFilter) (array zero-terminated=1) (transfer container)',
|
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
|
|
|
dup_value_func => '$var = g_value_dup_boxed (gimp_value_array_index ($value))',
|
|
|
|
set_value_func => 'g_value_set_boxed ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_boxed ($value, $var)' },
|
|
|
|
|
2023-10-02 23:22:49 +02:00
|
|
|
resourcearray => { name => 'RESOURCEARRAY',
|
2024-10-22 12:28:57 +02:00
|
|
|
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
2023-10-02 23:22:49 +02:00
|
|
|
type => 'GimpResource **',
|
|
|
|
const_type => 'const GimpResource **',
|
2025-07-12 18:54:20 +02:00
|
|
|
app_const_type => 'GimpResource **',
|
2023-10-02 23:22:49 +02:00
|
|
|
init_value => 'NULL',
|
2024-10-22 12:28:57 +02:00
|
|
|
in_annotate => '(element-type GimpResource) (array zero-terminated=1)',
|
|
|
|
out_annotate => '(element-type GimpResource) (array zero-terminated=1) (transfer container)',
|
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
|
|
|
dup_value_func => '$var = g_value_dup_boxed (gimp_value_array_index ($value))',
|
|
|
|
set_value_func => 'g_value_set_boxed ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_boxed ($value, $var)' },
|
2023-10-02 23:22:49 +02:00
|
|
|
|
|
|
|
brusharray => { name => 'BRUSHARRAY',
|
2024-10-22 12:28:57 +02:00
|
|
|
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
2023-10-02 23:22:49 +02:00
|
|
|
type => 'GimpBrush **',
|
|
|
|
const_type => 'const GimpBrush **',
|
|
|
|
init_value => 'NULL',
|
2024-10-22 12:28:57 +02:00
|
|
|
in_annotate => '(element-type GimpBrush) (array zero-terminated=1)',
|
|
|
|
out_annotate => '(element-type GimpBrush) (array zero-terminated=1) (transfer container)',
|
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
|
|
|
dup_value_func => '$var = g_value_dup_boxed (gimp_value_array_index ($value))',
|
|
|
|
set_value_func => 'g_value_set_boxed ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_boxed ($value, $var)' },
|
2023-10-02 23:22:49 +02:00
|
|
|
|
|
|
|
fontarray => { name => 'FONTARRAY',
|
2024-10-22 12:28:57 +02:00
|
|
|
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
2023-10-02 23:22:49 +02:00
|
|
|
type => 'GimpFont **',
|
|
|
|
const_type => 'const GimpFont **',
|
2025-07-12 18:54:20 +02:00
|
|
|
app_const_type => 'GimpFont **',
|
2023-10-02 23:22:49 +02:00
|
|
|
init_value => 'NULL',
|
2024-10-22 12:28:57 +02:00
|
|
|
in_annotate => '(element-type GimpFont) (array zero-terminated=1)',
|
|
|
|
out_annotate => '(element-type GimpFont) (array zero-terminated=1) (transfer container)',
|
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
|
|
|
dup_value_func => '$var = g_value_dup_boxed (gimp_value_array_index ($value))',
|
|
|
|
set_value_func => 'g_value_set_boxed ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_boxed ($value, $var)' },
|
2023-10-02 23:22:49 +02:00
|
|
|
|
|
|
|
gradientarray => { name => 'GRADIENTARRAY',
|
2024-10-22 12:28:57 +02:00
|
|
|
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
2023-10-02 23:22:49 +02:00
|
|
|
type => 'GimpGradient **',
|
|
|
|
const_type => 'const GimpGradient **',
|
2025-07-12 18:54:20 +02:00
|
|
|
app_const_type => 'GimpGradient **',
|
2023-10-02 23:22:49 +02:00
|
|
|
init_value => 'NULL',
|
2024-10-22 12:28:57 +02:00
|
|
|
in_annotate => '(element-type GimpGradient) (array zero-terminated=1)',
|
|
|
|
out_annotate => '(element-type GimpGradient) (array zero-terminated=1) (transfer container)',
|
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
|
|
|
dup_value_func => '$var = g_value_dup_boxed (gimp_value_array_index ($value))',
|
|
|
|
set_value_func => 'g_value_set_boxed ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_boxed ($value, $var)' },
|
2023-10-02 23:22:49 +02:00
|
|
|
|
|
|
|
palettearray => { name => 'PALETTEARRAY',
|
2024-10-22 12:28:57 +02:00
|
|
|
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
2023-10-02 23:22:49 +02:00
|
|
|
type => 'GimpPalette **',
|
|
|
|
const_type => 'const GimpPalette **',
|
2025-07-12 18:54:20 +02:00
|
|
|
app_const_type => 'GimpPalette **',
|
2023-10-02 23:22:49 +02:00
|
|
|
init_value => 'NULL',
|
2024-10-22 12:28:57 +02:00
|
|
|
in_annotate => '(element-type GimpPalette) (array zero-terminated=1)',
|
|
|
|
out_annotate => '(element-type GimpPalette) (array zero-terminated=1) (transfer container)',
|
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
|
|
|
dup_value_func => '$var = g_value_dup_boxed (gimp_value_array_index ($value))',
|
|
|
|
set_value_func => 'g_value_set_boxed ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_boxed ($value, $var)' },
|
2023-10-02 23:22:49 +02:00
|
|
|
|
|
|
|
patternarray => { name => 'PATTERNARRAY',
|
2024-10-22 12:28:57 +02:00
|
|
|
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
2023-10-02 23:22:49 +02:00
|
|
|
type => 'GimpPattern **',
|
|
|
|
const_type => 'const GimpPattern **',
|
2025-07-12 18:54:20 +02:00
|
|
|
app_const_type => 'GimpPattern **',
|
2023-10-02 23:22:49 +02:00
|
|
|
init_value => 'NULL',
|
2024-10-22 12:28:57 +02:00
|
|
|
in_annotate => '(element-type GimpPattern) (array zero-terminated=1)',
|
|
|
|
out_annotate => '(element-type GimpPattern) (array zero-terminated=1) (transfer container)',
|
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
|
|
|
dup_value_func => '$var = g_value_dup_boxed (gimp_value_array_index ($value))',
|
|
|
|
set_value_func => 'g_value_set_boxed ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_boxed ($value, $var)' },
|
2023-10-02 23:22:49 +02:00
|
|
|
|
2023-11-03 21:26:51 +01:00
|
|
|
geglcolor => { name => 'GEGLCOLOR',
|
|
|
|
gtype => 'GEGL_TYPE_COLOR',
|
|
|
|
type => 'GeglColor *',
|
|
|
|
const_type => 'GeglColor *',
|
|
|
|
init_value => 'NULL',
|
|
|
|
out_annotate => '(transfer full)',
|
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
|
|
|
dup_value_func => '$var = g_value_dup_object (gimp_value_array_index ($value))',
|
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
2024-03-23 04:10:26 +00:00
|
|
|
take_value_func => 'g_value_take_object ($value, $var)',
|
|
|
|
headers => [ qw(<cairo.h> "libgimpcolor/gimpcolor.h") ] },
|
2023-11-03 21:26:51 +01:00
|
|
|
|
2024-09-20 21:55:21 +02:00
|
|
|
format => { name => 'FORMAT',
|
|
|
|
gtype => 'GIMP_TYPE_BABL_FORMAT',
|
|
|
|
type => 'const Babl *',
|
|
|
|
const_type => 'const Babl *',
|
|
|
|
init_value => 'NULL',
|
|
|
|
out_annotate => '(transfer none)',
|
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
|
|
|
dup_value_func => '$var = g_value_get_boxed (gimp_value_array_index ($value))',
|
|
|
|
set_value_func => 'g_value_set_boxed ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_boxed ($value, $var)' },
|
|
|
|
|
2019-07-30 10:39:56 +02:00
|
|
|
display => { name => 'DISPLAY',
|
2019-08-29 11:25:35 +02:00
|
|
|
gtype => 'GIMP_TYPE_DISPLAY',
|
2019-08-13 21:36:03 +02:00
|
|
|
type => 'GimpDisplay *',
|
|
|
|
const_type => 'GimpDisplay *',
|
2019-09-04 14:27:18 +02:00
|
|
|
app_type => 'GimpDisplay *',
|
|
|
|
app_const_type => 'GimpDisplay *',
|
2019-07-30 10:39:56 +02:00
|
|
|
init_value => 'NULL',
|
2019-08-15 10:14:38 +02:00
|
|
|
out_annotate => '(transfer none)',
|
2019-08-29 11:25:35 +02:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2019-09-04 02:49:33 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_DISPLAY ($value)',
|
2019-08-29 11:25:35 +02:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
2019-09-03 13:31:27 +02:00
|
|
|
take_value_func => 'g_value_set_object ($value, $var)' },
|
2019-07-30 10:39:56 +02:00
|
|
|
|
|
|
|
image => { name => 'IMAGE',
|
2019-08-29 11:25:35 +02:00
|
|
|
gtype => 'GIMP_TYPE_IMAGE',
|
2019-07-30 10:39:56 +02:00
|
|
|
type => 'GimpImage *',
|
|
|
|
const_type => 'GimpImage *',
|
|
|
|
init_value => 'NULL',
|
2019-08-15 10:01:08 +02:00
|
|
|
out_annotate => '(transfer none)',
|
2019-08-29 11:25:35 +02:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2019-09-04 02:49:33 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_IMAGE ($value)',
|
2019-08-29 11:25:35 +02:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2019-07-30 10:39:56 +02:00
|
|
|
headers => [ qw("core/gimpimage.h") ] },
|
|
|
|
|
|
|
|
item => { name => 'ITEM',
|
2019-08-29 11:25:35 +02:00
|
|
|
gtype => 'GIMP_TYPE_ITEM',
|
2019-07-30 10:39:56 +02:00
|
|
|
type => 'GimpItem *',
|
|
|
|
const_type => 'GimpItem *',
|
|
|
|
init_value => 'NULL',
|
2019-08-15 12:12:25 +02:00
|
|
|
out_annotate => '(transfer none)',
|
2019-08-29 11:25:35 +02:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2019-09-04 02:49:33 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_ITEM ($value)',
|
2019-08-29 11:25:35 +02:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2019-07-30 10:39:56 +02:00
|
|
|
headers => [ qw("core/gimpitem.h") ] },
|
|
|
|
|
|
|
|
layer => { name => 'LAYER',
|
2019-08-29 11:25:35 +02:00
|
|
|
gtype => 'GIMP_TYPE_LAYER',
|
2019-07-30 10:39:56 +02:00
|
|
|
type => 'GimpLayer *',
|
|
|
|
const_type => 'GimpLayer *',
|
|
|
|
init_value => 'NULL',
|
2019-08-15 12:12:25 +02:00
|
|
|
out_annotate => '(transfer none)',
|
2019-08-29 11:25:35 +02:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2019-09-04 02:49:33 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_LAYER ($value)',
|
2019-08-29 11:25:35 +02:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2019-07-30 10:39:56 +02:00
|
|
|
headers => [ qw("core/gimplayer.h") ] },
|
|
|
|
|
2022-09-30 16:21:47 +02:00
|
|
|
text_layer => { name => 'TEXT_LAYER',
|
|
|
|
gtype => 'GIMP_TYPE_TEXT_LAYER',
|
|
|
|
type => 'GimpTextLayer *',
|
|
|
|
const_type => 'GimpTextLayer *',
|
|
|
|
init_value => 'NULL',
|
|
|
|
out_annotate => '(transfer none)',
|
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_TEXT_LAYER ($value)',
|
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
headers => [ qw("text/gimptextlayer.h") ] },
|
|
|
|
|
2025-07-12 21:56:50 -04:00
|
|
|
vector_layer => { name => 'VECTOR_LAYER',
|
|
|
|
gtype => 'GIMP_TYPE_VECTOR_LAYER',
|
|
|
|
type => 'GimpVectorLayer *',
|
|
|
|
const_type => 'GimpVectorLayer *',
|
|
|
|
init_value => 'NULL',
|
|
|
|
out_annotate => '(transfer none)',
|
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_VECTOR_LAYER ($value)',
|
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
headers => [ qw("path/gimpvectorlayer.h") ] },
|
|
|
|
|
2025-09-24 00:50:56 +02:00
|
|
|
link_layer => { name => 'LINK_LAYER',
|
|
|
|
gtype => 'GIMP_TYPE_LINK_LAYER',
|
|
|
|
type => 'GimpLinkLayer *',
|
|
|
|
const_type => 'GimpLinkLayer *',
|
|
|
|
init_value => 'NULL',
|
|
|
|
out_annotate => '(transfer none)',
|
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_LINK_LAYER ($value)',
|
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
headers => [ qw("core/gimplinklayer.h") ] },
|
|
|
|
|
app, libgimp, pdb, plug-ins: new GimpGroupLayer class in libgimp.
Also:
- renaming gimp_layer_group_new() to gimp_group_layer_new() in order to keep the
same name as in core code (i.e. GimpGroupLayer, not GimpLayerGroup).
- renaming gimp_image_merge_layer_group() to gimp_group_layer_merge()
- new functions: gimp_procedure_add_group_layer_argument(),
gimp_procedure_add_group_layer_aux_argument() and
gimp_procedure_add_group_layer_return_value().
This can be tested, e.g. in Python with these calls:
```py
i = Gimp.get_images()[0]
g = Gimp.GroupLayer.new(i, "hello")
i.insert_layer(g, None, 1)
g2 = Gimp.GroupLayer.new(i, "world")
i.insert_layer(g2, g, 1)
g.merge()
```
This was work started long ago, stored in an old stash which I finally
finish now! :-)
2024-07-06 17:24:11 +02:00
|
|
|
group_layer => { name => 'GROUP_LAYER',
|
|
|
|
gtype => 'GIMP_TYPE_GROUP_LAYER',
|
|
|
|
type => 'GimpGroupLayer *',
|
|
|
|
const_type => 'GimpGroupLayer *',
|
|
|
|
init_value => 'NULL',
|
|
|
|
out_annotate => '(transfer none)',
|
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_GROUP_LAYER ($value)',
|
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
headers => [ qw("core/gimpgrouplayer.h") ] },
|
|
|
|
|
2019-07-30 10:39:56 +02:00
|
|
|
channel => { name => 'CHANNEL',
|
2019-08-29 11:25:35 +02:00
|
|
|
gtype => 'GIMP_TYPE_CHANNEL',
|
2019-07-30 10:39:56 +02:00
|
|
|
type => 'GimpChannel *',
|
|
|
|
const_type => 'GimpChannel *',
|
|
|
|
init_value => 'NULL',
|
2019-08-15 12:12:25 +02:00
|
|
|
out_annotate => '(transfer none)',
|
2019-08-29 11:25:35 +02:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2019-09-04 02:49:33 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_CHANNEL ($value)',
|
2019-08-29 11:25:35 +02:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2019-07-30 10:39:56 +02:00
|
|
|
headers => [ qw("core/gimpchannel.h") ] },
|
|
|
|
|
|
|
|
drawable => { name => 'DRAWABLE',
|
2019-08-29 11:25:35 +02:00
|
|
|
gtype => 'GIMP_TYPE_DRAWABLE',
|
2019-07-30 10:39:56 +02:00
|
|
|
type => 'GimpDrawable *',
|
|
|
|
const_type => 'GimpDrawable *',
|
|
|
|
init_value => 'NULL',
|
2019-08-15 12:12:25 +02:00
|
|
|
out_annotate => '(transfer none)',
|
2019-08-29 11:25:35 +02:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2019-09-04 02:49:33 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_DRAWABLE ($value)',
|
2019-08-29 11:25:35 +02:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2019-07-30 10:39:56 +02:00
|
|
|
headers => [ qw("core/gimpdrawable.h") ] },
|
|
|
|
|
|
|
|
selection => { name => 'SELECTION',
|
2019-08-29 11:25:35 +02:00
|
|
|
gtype => 'GIMP_TYPE_SELECTION',
|
2019-07-30 10:39:56 +02:00
|
|
|
type => 'GimpSelection *',
|
|
|
|
const_type => 'GimpSelection *',
|
|
|
|
init_value => 'NULL',
|
2019-08-15 12:12:25 +02:00
|
|
|
out_annotate => '(transfer none)',
|
2019-08-29 11:25:35 +02:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2019-09-04 02:49:33 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_SELECTION ($value)',
|
2019-08-29 11:25:35 +02:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2019-07-30 10:39:56 +02:00
|
|
|
headers => [ qw("core/gimpselection.h") ] },
|
|
|
|
|
|
|
|
layer_mask => { name => 'CHANNEL',
|
2019-08-29 11:25:35 +02:00
|
|
|
gtype => 'GIMP_TYPE_LAYER_MASK',
|
2019-07-30 10:39:56 +02:00
|
|
|
type => 'GimpLayerMask *',
|
|
|
|
const_type => 'GimpLayerMask *',
|
|
|
|
init_value => 'NULL',
|
2019-08-15 12:12:25 +02:00
|
|
|
out_annotate => '(transfer none)',
|
2019-08-29 11:25:35 +02:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2019-09-04 02:49:33 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_LAYER_MASK ($value)',
|
2019-08-29 11:25:35 +02:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2019-07-30 10:39:56 +02:00
|
|
|
headers => [ qw("core/gimplayermask.h") ] },
|
|
|
|
|
2024-07-12 06:16:25 +00:00
|
|
|
path => { name => 'PATH',
|
|
|
|
gtype => 'GIMP_TYPE_PATH',
|
|
|
|
type => 'GimpPath *',
|
|
|
|
const_type => 'GimpPath *',
|
2019-07-30 10:39:56 +02:00
|
|
|
init_value => 'NULL',
|
2019-08-15 12:12:25 +02:00
|
|
|
out_annotate => '(transfer none)',
|
2019-08-29 11:25:35 +02:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2024-07-12 06:16:25 +00:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_PATH ($value)',
|
2019-08-29 11:25:35 +02:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2025-07-07 15:43:07 +02:00
|
|
|
headers => [ qw("path/gimppath.h") ] },
|
2019-07-30 10:39:56 +02:00
|
|
|
|
2024-11-25 04:38:39 +09:00
|
|
|
filter => { name => 'DRAWABLE_FILTER',
|
|
|
|
gtype => 'GIMP_TYPE_DRAWABLE_FILTER',
|
|
|
|
type => 'GimpDrawableFilter *',
|
|
|
|
const_type => 'GimpDrawableFilter *',
|
|
|
|
init_value => 'NULL',
|
|
|
|
out_annotate => '(transfer none)',
|
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_DRAWABLE_FILTER ($value)',
|
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
headers => [ qw("core/gimpdrawablefilter.h") ] },
|
|
|
|
|
2019-09-11 21:48:34 +02:00
|
|
|
file => { name => 'FILE',
|
|
|
|
gtype => 'G_TYPE_FILE',
|
|
|
|
type => 'GFile *',
|
|
|
|
const_type => 'GFile *',
|
|
|
|
init_value => 'NULL',
|
|
|
|
out_annotate => '(transfer full)',
|
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
|
|
|
dup_value_func => '$var = GIMP_VALUES_DUP_FILE ($value)',
|
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
2025-09-24 02:18:24 +02:00
|
|
|
take_value_func => 'g_value_take_object ($value, $var)' },
|
2019-09-11 21:48:34 +02:00
|
|
|
|
2019-07-30 10:39:56 +02:00
|
|
|
parasite => { name => 'PARASITE',
|
|
|
|
gtype => 'GIMP_TYPE_PARASITE',
|
|
|
|
type => 'GimpParasite *',
|
|
|
|
const_type => 'const GimpParasite *',
|
|
|
|
init_value => 'NULL',
|
2019-07-31 18:58:52 +02:00
|
|
|
out_annotate => '(transfer full)',
|
2019-07-30 10:39:56 +02:00
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
2019-09-04 02:49:33 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_DUP_PARASITE ($value)',
|
2019-07-30 10:39:56 +02:00
|
|
|
set_value_func => 'g_value_set_boxed ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_boxed ($value, $var)',
|
|
|
|
headers => [ qw("libgimpbase/gimpbase.h") ] },
|
1998-10-24 05:19:30 +00:00
|
|
|
|
2019-08-05 10:46:55 +02:00
|
|
|
param => { name => 'PARAM',
|
|
|
|
gtype => 'G_TYPE_PARAM_SPEC',
|
|
|
|
type => 'GParamSpec *',
|
|
|
|
const_type => 'GParamSpec *',
|
|
|
|
init_value => 'NULL',
|
|
|
|
out_annotate => '(transfer full)',
|
|
|
|
get_value_func => '$var = g_value_get_param ($value)',
|
2019-09-04 02:49:33 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_DUP_PARAM ($value)',
|
2019-08-05 10:46:55 +02:00
|
|
|
set_value_func => 'g_value_set_param ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_param ($value, $var)' },
|
|
|
|
|
1998-10-24 05:19:30 +00:00
|
|
|
# Special cases
|
2019-08-15 16:41:39 +02:00
|
|
|
enum => { name => 'ENUM',
|
2019-07-30 10:39:56 +02:00
|
|
|
gtype => 'G_TYPE_ENUM',
|
2019-08-15 14:04:56 +02:00
|
|
|
type => 'gint ',
|
|
|
|
const_type => 'gint ',
|
2019-07-30 10:39:56 +02:00
|
|
|
init_value => '0',
|
|
|
|
get_value_func => '$var = g_value_get_enum ($value)',
|
2019-09-04 02:49:33 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_ENUM ($value)',
|
2019-07-30 10:39:56 +02:00
|
|
|
set_value_func => 'g_value_set_enum ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_enum ($value, $var)' },
|
|
|
|
|
2019-08-15 16:41:39 +02:00
|
|
|
boolean => { name => 'BOOLEAN',
|
2019-07-30 10:39:56 +02:00
|
|
|
gtype => 'G_TYPE_BOOLEAN',
|
|
|
|
type => 'gboolean ',
|
|
|
|
const_type => 'gboolean ',
|
|
|
|
init_value => 'FALSE',
|
|
|
|
get_value_func => '$var = g_value_get_boolean ($value)',
|
2019-09-04 02:49:33 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_BOOLEAN ($value)',
|
2019-07-30 10:39:56 +02:00
|
|
|
set_value_func => 'g_value_set_boolean ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_boolean ($value, $var)' },
|
|
|
|
|
2019-08-15 16:41:39 +02:00
|
|
|
tattoo => { name => 'TATTOO',
|
|
|
|
gtype => 'G_TYPE_UINT',
|
|
|
|
type => 'guint ',
|
|
|
|
const_type => 'guint ',
|
2019-07-30 10:39:56 +02:00
|
|
|
init_value => '0',
|
|
|
|
get_value_func => '$var = g_value_get_uint ($value)',
|
2019-09-04 02:49:33 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_UINT ($value)',
|
2019-07-30 10:39:56 +02:00
|
|
|
set_value_func => 'g_value_set_uint ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_uint ($value, $var)' },
|
|
|
|
|
2019-08-15 16:41:39 +02:00
|
|
|
guide => { name => 'GUIDE',
|
|
|
|
gtype => 'G_TYPE_UINT',
|
|
|
|
type => 'guint ',
|
|
|
|
const_type => 'guint ',
|
2019-07-30 10:39:56 +02:00
|
|
|
init_value => '0',
|
|
|
|
get_value_func => '$var = g_value_get_uint ($value)',
|
2019-09-04 02:49:33 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_UINT ($value)',
|
2019-07-30 10:39:56 +02:00
|
|
|
set_value_func => 'g_value_set_uint ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_uint ($value, $var)' },
|
|
|
|
|
2019-08-15 16:41:39 +02:00
|
|
|
sample_point => { name => 'SAMPLE_POINT',
|
|
|
|
gtype => 'G_TYPE_UINT',
|
|
|
|
type => 'guint ',
|
|
|
|
const_type => 'guint ',
|
2019-07-30 10:39:56 +02:00
|
|
|
init_value => '0',
|
|
|
|
get_value_func => '$var = g_value_get_uint ($value)',
|
2019-09-04 02:49:33 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_UINT ($value)',
|
2019-07-30 10:39:56 +02:00
|
|
|
set_value_func => 'g_value_set_uint ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_uint ($value, $var)' },
|
|
|
|
|
2024-05-06 18:38:12 +00:00
|
|
|
export_options => { name => 'EXPORT_OPTIONS',
|
|
|
|
gtype => 'GIMP_TYPE_EXPORT_OPTIONS',
|
|
|
|
type => 'GimpExportOptions *',
|
|
|
|
const_type => 'GimpExportOptions *',
|
|
|
|
init_value => 'NULL',
|
app, libgimp*, pdb, plug-ins: review and enhance MR !1549.
- Fix annotations for gimp_export_options_get_image() to make it
actually introspectable with the GimpImage being both input and
output. Even though the logic doesn't change much (the input image may
be overriden or not), it doesn't matter for introspection because
images are handled centrally by libgimp and therefore must not be
freed. Actually deleting the image from the central list of images
though remains a manual action depending on code logic, not some
automatic action to be handled by binding engines.
- Add G_GNUC_WARN_UNUSED_RESULT to gimp_export_options_get_image()
because ignoring the returned value is rarely a good idea (as you
usually want to delete the image).
- Remove gimp_export_options_new(): we don't need this constructor
because at this point, the best is to tell plug-in developers to just
pass NULL everywhere. This leaves us free to create a more useful
default constructor if needed, in the future. Main description for
GimpExportOptions has also been updated to say this.
- Add a data_destroy callback for the user data passed in
gimp_export_procedure_set_capabilities().
- Fixing annotations of 'export_options' object from pdb/pdb.pl: input
args would actually be (nullable) and would not transfer ownership
(calling code must still free the object). Return value's ownership on
the other hand is fully transfered.
- Add C and Python unit testing for GimpExportOptions and
gimp_export_options_get_image() in particular.
- Fix or improve various details.
Note that I have also considered for a long time changing the signature
of gimp_export_options_get_image() to return a boolean indicating
whether `image` had been replaced (hence needed deletion) or not. This
also meant getting rid of the GimpExportReturn enum. Right now it would
work because there are no third case, but I was considering the future
possibility that for instance we got some impossible conversion for some
future capability. I'm not sure it would ever happen; and for sure, this
is not desirable because it implies an export failure a bit late in the
workflow. But just in case, let's keep the enum return value. It does
not even make the using code that much more complicated (well just a
value comparison instead of a simple boolean test).
2024-08-17 15:06:27 +02:00
|
|
|
in_annotate => '(nullable)',
|
|
|
|
out_annotate => '(transfer full)',
|
2024-05-06 18:38:12 +00:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
|
|
|
dup_value_func => '$var = g_value_dup_object (gimp_value_array_index ($value))',
|
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
headers => [ qw("libgimpbase/gimpbase.h") ] },
|
|
|
|
|
2019-08-15 16:41:39 +02:00
|
|
|
unit => { name => 'UNIT',
|
2019-07-30 10:39:56 +02:00
|
|
|
gtype => 'GIMP_TYPE_UNIT',
|
Issue #8900 and #9923: reimplementing GimpUnit as a proper class.
This fixes all our GObject Introspection issues with GimpUnit which was
both an enum and an int-derived type of user-defined units *completing*
the enum values. GIR clearly didn't like this!
Now GimpUnit is a proper class and units are unique objects, allowing to
compare them with an identity test (i.e. `unit == gimp_unit_pixel ()`
tells us if unit is the pixel unit or not), which makes it easy to use,
just like with int, yet adding also methods, making for nicer
introspected API.
As an aside, this also fixes #10738, by having all the built-in units
retrievable even if libgimpbase had not been properly initialized with
gimp_base_init().
I haven't checked in details how GIR works to introspect, but it looks
like it loads the library to inspect and runs functions, hence
triggering some CRITICALS because virtual methods (supposed to be
initialized with gimp_base_init() run by libgimp) are not set. This new
code won't trigger any critical because the vtable method are now not
necessary, at least for all built-in units.
Note that GimpUnit is still in libgimpbase. It could have been moved to
libgimp in order to avoid any virtual method table (since we need to
keep core and libgimp side's units in sync, PDB is required), but too
many libgimpwidgets widgets were already using GimpUnit. And technically
most of GimpUnit logic doesn't require PDB (only the creation/sync
part). This is one of the reasons why user-created GimpUnit list is
handled and stored differently from other types of objects.
Globally this simplifies the code a lot too and we don't need separate
implementations of various utils for core and libgimp, which means less
prone to errors.
2024-07-25 20:55:21 +02:00
|
|
|
type => 'GimpUnit *',
|
|
|
|
const_type => 'GimpUnit *',
|
|
|
|
init_value => 'NULL',
|
2019-08-05 15:31:12 +02:00
|
|
|
out_annotate => '(transfer none)',
|
Issue #8900 and #9923: reimplementing GimpUnit as a proper class.
This fixes all our GObject Introspection issues with GimpUnit which was
both an enum and an int-derived type of user-defined units *completing*
the enum values. GIR clearly didn't like this!
Now GimpUnit is a proper class and units are unique objects, allowing to
compare them with an identity test (i.e. `unit == gimp_unit_pixel ()`
tells us if unit is the pixel unit or not), which makes it easy to use,
just like with int, yet adding also methods, making for nicer
introspected API.
As an aside, this also fixes #10738, by having all the built-in units
retrievable even if libgimpbase had not been properly initialized with
gimp_base_init().
I haven't checked in details how GIR works to introspect, but it looks
like it loads the library to inspect and runs functions, hence
triggering some CRITICALS because virtual methods (supposed to be
initialized with gimp_base_init() run by libgimp) are not set. This new
code won't trigger any critical because the vtable method are now not
necessary, at least for all built-in units.
Note that GimpUnit is still in libgimpbase. It could have been moved to
libgimp in order to avoid any virtual method table (since we need to
keep core and libgimp side's units in sync, PDB is required), but too
many libgimpwidgets widgets were already using GimpUnit. And technically
most of GimpUnit logic doesn't require PDB (only the creation/sync
part). This is one of the reasons why user-created GimpUnit list is
handled and stored differently from other types of objects.
Globally this simplifies the code a lot too and we don't need separate
implementations of various utils for core and libgimp, which means less
prone to errors.
2024-07-25 20:55:21 +02:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_UNIT ($value)',
|
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
headers => [ qw("libgimpbase/gimpbase.h") ] },
|
2022-09-05 19:28:35 -04:00
|
|
|
|
2023-05-31 16:12:04 +02:00
|
|
|
resource => { name => 'RESOURCE',
|
|
|
|
gtype => 'GIMP_TYPE_RESOURCE',
|
|
|
|
type => 'GimpResource *',
|
|
|
|
const_type => 'GimpResource *',
|
|
|
|
init_value => 'NULL',
|
2023-07-11 16:13:36 +02:00
|
|
|
out_annotate => '(transfer none)',
|
2023-05-31 16:12:04 +02:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_RESOURCE ($value)',
|
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
headers => [ qw("core/gimpresource.h") ] },
|
|
|
|
|
2022-09-05 19:28:35 -04:00
|
|
|
brush => { name => 'BRUSH',
|
|
|
|
gtype => 'GIMP_TYPE_BRUSH',
|
|
|
|
type => 'GimpBrush *',
|
|
|
|
const_type => 'GimpBrush *',
|
|
|
|
init_value => 'NULL',
|
2023-07-11 16:13:36 +02:00
|
|
|
out_annotate => '(transfer none)',
|
2022-09-05 19:28:35 -04:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_BRUSH ($value)',
|
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
headers => [ qw("core/gimpbrush.h") ] },
|
|
|
|
|
2023-05-31 16:12:04 +02:00
|
|
|
|
|
|
|
pattern => { name => 'PATTERN',
|
|
|
|
gtype => 'GIMP_TYPE_PATTERN',
|
|
|
|
type => 'GimpPattern *',
|
|
|
|
const_type => 'GimpPattern *',
|
2022-09-05 19:28:35 -04:00
|
|
|
init_value => 'NULL',
|
2023-07-11 16:13:36 +02:00
|
|
|
out_annotate => '(transfer none)',
|
2022-09-05 19:28:35 -04:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2023-05-31 16:12:04 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_PATTERN ($value)',
|
2022-09-05 19:28:35 -04:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2023-05-31 16:12:04 +02:00
|
|
|
headers => [ qw("core/gimppattern.h") ] },
|
2022-09-05 19:28:35 -04:00
|
|
|
|
|
|
|
gradient => { name => 'GRADIENT',
|
|
|
|
gtype => 'GIMP_TYPE_GRADIENT',
|
|
|
|
type => 'GimpGradient *',
|
|
|
|
const_type => 'GimpGradient *',
|
|
|
|
init_value => 'NULL',
|
2023-07-11 16:13:36 +02:00
|
|
|
out_annotate => '(transfer none)',
|
2022-09-05 19:28:35 -04:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_GRADIENT ($value)',
|
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
headers => [ qw("core/gimpgradient.h") ] },
|
|
|
|
|
|
|
|
palette => { name => 'PALETTE',
|
|
|
|
gtype => 'GIMP_TYPE_PALETTE',
|
|
|
|
type => 'GimpPalette *',
|
|
|
|
const_type => 'GimpPalette *',
|
|
|
|
init_value => 'NULL',
|
2023-07-11 16:13:36 +02:00
|
|
|
out_annotate => '(transfer none)',
|
2022-09-05 19:28:35 -04:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_PALETTE ($value)',
|
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
headers => [ qw("core/gimppalette.h") ] },
|
|
|
|
|
2023-05-31 16:12:04 +02:00
|
|
|
font => { name => 'FONT',
|
|
|
|
gtype => 'GIMP_TYPE_FONT',
|
|
|
|
type => 'GimpFont *',
|
|
|
|
const_type => 'GimpFont *',
|
2022-09-05 19:28:35 -04:00
|
|
|
init_value => 'NULL',
|
2023-07-11 16:13:36 +02:00
|
|
|
out_annotate => '(transfer none)',
|
2022-09-05 19:28:35 -04:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2023-05-31 16:12:04 +02:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_FONT ($value)',
|
2022-09-05 19:28:35 -04:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2024-11-29 17:37:23 +09:00
|
|
|
headers => [ qw("text/gimpfont.h") ] },
|
|
|
|
|
|
|
|
valuearray => { name => 'VALUEARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_VALUE_ARRAY',
|
|
|
|
type => 'GimpValueArray *',
|
|
|
|
const_type => 'const GimpValueArray *',
|
|
|
|
init_value => 'NULL',
|
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
|
|
|
dup_value_func => '$var = g_value_dup_boxed (gimp_value_array_index ($value))',
|
|
|
|
set_value_func => 'g_value_set_boxed ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_boxed ($value, $var)' },
|
1998-10-24 05:19:30 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
# Split out the parts of an arg constraint
|
|
|
|
sub arg_parse {
|
|
|
|
my $arg = shift;
|
1999-03-17 23:08:08 +00:00
|
|
|
|
|
|
|
if ($arg =~ /^enum (\w+)(.*)/) {
|
|
|
|
my ($name, $remove) = ($1, $2);
|
|
|
|
my @retvals = ('enum', $name);
|
|
|
|
|
1999-03-28 06:36:11 +00:00
|
|
|
if ($remove && $remove =~ m@ \(no @) {
|
|
|
|
chop $remove; ($remove = substr($remove, 5)) =~ s/ $//;
|
1999-03-17 23:08:08 +00:00
|
|
|
push @retvals, split(/,\s*/, $remove);
|
|
|
|
}
|
|
|
|
|
|
|
|
return @retvals;
|
1998-10-24 05:19:30 +00:00
|
|
|
}
|
1999-04-27 04:33:41 +00:00
|
|
|
elsif ($arg =~ /^unit(?: \(min (.*?)\))?/) {
|
|
|
|
my @retvals = ('unit');
|
|
|
|
push @retvals, $1 if $1;
|
|
|
|
return @retvals;
|
|
|
|
}
|
2007-07-05 14:31:42 +00:00
|
|
|
elsif ($arg =~ /^(?:([+-.\dA-Z_][^\s]*) \s* (<=|<))?
|
1999-03-21 02:14:08 +00:00
|
|
|
\s* (\w+) \s*
|
2007-07-05 14:31:42 +00:00
|
|
|
(?:(<=|<) \s* ([+-.\dA-Z_][^\s]*))?
|
1999-03-19 23:04:16 +00:00
|
|
|
/x) {
|
2010-06-05 19:26:06 +02:00
|
|
|
return ($3, $1, $2, $5, $4);
|
1998-10-24 05:19:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1999-04-04 05:59:08 +00:00
|
|
|
1;
|