2006-12-10 05:33:38 +08:00
|
|
|
# GIMP - The GNU Image Manipulation Program
|
2003-07-03 08:47:26 +08:00
|
|
|
# Copyright (C) 1998-2003 Manish Singh <yosh@gimp.org>
|
1998-10-24 13:19:30 +08:00
|
|
|
|
2009-01-18 06:28:01 +08:00
|
|
|
# This program is free software: you can redistribute it and/or modify
|
1998-10-24 13:19:30 +08:00
|
|
|
# it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
1998-10-24 13:19:30 +08: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-12 05:27:07 +08:00
|
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
1998-10-24 13:19:30 +08:00
|
|
|
|
|
|
|
package Gimp::CodeGen::pdb;
|
|
|
|
|
|
|
|
%arg_types = (
|
2019-07-30 16:39:56 +08:00
|
|
|
int32 => { name => 'INT32',
|
2019-08-15 20:04:56 +08:00
|
|
|
gtype => 'G_TYPE_INT',
|
|
|
|
type => 'gint ',
|
|
|
|
const_type => 'gint ',
|
2019-07-30 16:39:56 +08:00
|
|
|
init_value => '0',
|
|
|
|
get_value_func => '$var = g_value_get_int ($value)',
|
2019-09-04 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_INT ($value)',
|
2019-07-30 16:39:56 +08:00
|
|
|
set_value_func => 'g_value_set_int ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_int ($value, $var)' },
|
|
|
|
|
|
|
|
float => { name => 'FLOAT',
|
|
|
|
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 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_DOUBLE ($value)',
|
2019-07-30 16:39:56 +08: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-08-01 00:58:52 +08:00
|
|
|
out_annotate => '(transfer full)',
|
2019-07-30 16:39:56 +08:00
|
|
|
get_value_func => '$var = g_value_get_string ($value)',
|
2019-09-04 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_DUP_STRING ($value)',
|
2019-07-30 16:39:56 +08:00
|
|
|
set_value_func => 'g_value_set_string ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_string ($value, $var)' },
|
|
|
|
|
2020-12-24 04:15:43 +08: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-24 05:37:46 +08: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 16:39:56 +08:00
|
|
|
int32array => { name => 'INT32ARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_INT32_ARRAY',
|
|
|
|
type => 'gint32 *',
|
|
|
|
const_type => 'const gint32 *',
|
|
|
|
array => 1,
|
|
|
|
init_value => 'NULL',
|
2019-08-01 00:58:52 +08:00
|
|
|
in_annotate => '(element-type gint32)',
|
|
|
|
out_annotate => '(element-type gint32) (transfer full)',
|
2019-07-30 16:39:56 +08:00
|
|
|
get_value_func => '$var = gimp_value_get_int32_array ($value)',
|
2019-09-04 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_DUP_INT32_ARRAY ($value)',
|
2019-07-30 16:39:56 +08: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)' },
|
|
|
|
|
|
|
|
floatarray => { name => 'FLOATARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_FLOAT_ARRAY',
|
|
|
|
type => 'gdouble *',
|
|
|
|
const_type => 'const gdouble *',
|
|
|
|
array => 1,
|
|
|
|
init_value => 'NULL',
|
2019-08-01 00:58:52 +08:00
|
|
|
in_annotate => '(element-type gdouble)',
|
|
|
|
out_annotate => '(element-type gdouble) (transfer full)',
|
2019-07-30 16:39:56 +08:00
|
|
|
get_value_func => '$var = gimp_value_get_float_array ($value)',
|
2019-09-04 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_DUP_FLOAT_ARRAY ($value)',
|
2019-07-30 16:39:56 +08:00
|
|
|
set_value_func => 'gimp_value_set_float_array ($value, $var, $var_len)',
|
|
|
|
take_value_func => 'gimp_value_take_float_array ($value, $var, $var_len)' },
|
|
|
|
|
2023-12-27 00:07:19 +08:00
|
|
|
colorarray => { name => 'COLOR_ARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_COLOR_ARRAY',
|
|
|
|
type => 'GeglColor **',
|
|
|
|
const_type => 'const GeglColor **',
|
2019-07-30 16:39:56 +08:00
|
|
|
init_value => 'NULL',
|
2023-12-27 00:07:19 +08: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 16:39:56 +08:00
|
|
|
|
2019-09-05 18:57:43 +08:00
|
|
|
imagearray => { name => 'IMAGEARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_OBJECT_ARRAY',
|
|
|
|
type => 'GimpImage **',
|
|
|
|
const_type => 'const GimpImage **',
|
|
|
|
array => 1,
|
|
|
|
init_value => 'NULL',
|
|
|
|
in_annotate => '(element-type GimpImage)',
|
|
|
|
out_annotate => '(element-type GimpImage) (transfer container)',
|
2020-05-07 19:03:11 +08:00
|
|
|
get_value_func => '$var = (const GimpImage **) gimp_value_get_object_array ($value)',
|
2021-08-26 23:18:32 +08:00
|
|
|
dup_value_func => '{ GimpObjectArray *a = g_value_get_boxed (gimp_value_array_index ($value)); if (a) $var = g_memdup2 (a->data, a->length * sizeof (gpointer)); }',
|
2019-09-05 18:57:43 +08:00
|
|
|
set_value_func => 'gimp_value_set_object_array ($value, GIMP_TYPE_IMAGE, (GObject **) $var, $var_len)',
|
|
|
|
take_value_func => 'gimp_value_take_object_array ($value, GIMP_TYPE_IMAGE, (GObject **) $var, $var_len)' },
|
|
|
|
|
|
|
|
itemarray => { name => 'ITEMARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_OBJECT_ARRAY',
|
|
|
|
type => 'GimpItem **',
|
|
|
|
const_type => 'const GimpItem **',
|
|
|
|
array => 1,
|
|
|
|
init_value => 'NULL',
|
|
|
|
in_annotate => '(element-type GimpItem)',
|
|
|
|
out_annotate => '(element-type GimpItem) (transfer container)',
|
2020-05-07 19:03:11 +08:00
|
|
|
get_value_func => '$var = (const GimpItem **) gimp_value_get_object_array ($value)',
|
2021-08-26 23:18:32 +08:00
|
|
|
dup_value_func => '{ GimpObjectArray *a = g_value_get_boxed (gimp_value_array_index ($value)); if (a) $var = g_memdup2 (a->data, a->length * sizeof (gpointer)); }',
|
2019-09-05 18:57:43 +08:00
|
|
|
set_value_func => 'gimp_value_set_object_array ($value, GIMP_TYPE_ITEM, (GObject **) $var, $var_len)',
|
|
|
|
take_value_func => 'gimp_value_take_object_array ($value, GIMP_TYPE_ITEM, (GObject **) $var, $var_len)' },
|
|
|
|
|
|
|
|
layerarray => { name => 'LAYERARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_OBJECT_ARRAY',
|
|
|
|
type => 'GimpLayer **',
|
|
|
|
const_type => 'const GimpLayer **',
|
|
|
|
array => 1,
|
|
|
|
init_value => 'NULL',
|
|
|
|
in_annotate => '(element-type GimpLayer)',
|
|
|
|
out_annotate => '(element-type GimpLayer) (transfer container)',
|
2020-05-07 19:03:11 +08:00
|
|
|
get_value_func => '$var = (const GimpLayer **) gimp_value_get_object_array ($value)',
|
2021-08-26 23:18:32 +08:00
|
|
|
dup_value_func => '{ GimpObjectArray *a = g_value_get_boxed (gimp_value_array_index ($value)); if (a) $var = g_memdup2 (a->data, a->length * sizeof (gpointer)); }',
|
2019-09-05 18:57:43 +08:00
|
|
|
set_value_func => 'gimp_value_set_object_array ($value, GIMP_TYPE_LAYER, (GObject **) $var, $var_len)',
|
|
|
|
take_value_func => 'gimp_value_take_object_array ($value, GIMP_TYPE_LAYER, (GObject **) $var, $var_len)' },
|
|
|
|
|
|
|
|
channelarray => { name => 'CHANNELARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_OBJECT_ARRAY',
|
|
|
|
type => 'GimpChannel **',
|
|
|
|
const_type => 'const GimpChannel **',
|
|
|
|
array => 1,
|
|
|
|
init_value => 'NULL',
|
|
|
|
in_annotate => '(element-type GimpChannel)',
|
|
|
|
out_annotate => '(element-type GimpChannel) (transfer container)',
|
2022-10-21 00:56:24 +08:00
|
|
|
get_value_func => '$var = (const GimpChannel **) gimp_value_get_object_array ($value)',
|
2021-08-26 23:18:32 +08:00
|
|
|
dup_value_func => '{ GimpObjectArray *a = g_value_get_boxed (gimp_value_array_index ($value)); if (a) $var = g_memdup2 (a->data, a->length * sizeof (gpointer)); }',
|
2019-09-05 18:57:43 +08:00
|
|
|
set_value_func => 'gimp_value_set_object_array ($value, GIMP_TYPE_CHANNEL, (GObject **) $var, $var_len)',
|
|
|
|
take_value_func => 'gimp_value_take_object_array ($value, GIMP_TYPE_CHANNEL, (GObject **) $var, $var_len)' },
|
|
|
|
|
2024-07-12 14:16:25 +08:00
|
|
|
patharray => { name => 'PATHARRAY',
|
2019-09-05 18:57:43 +08:00
|
|
|
gtype => 'GIMP_TYPE_OBJECT_ARRAY',
|
2024-07-12 14:16:25 +08:00
|
|
|
type => 'GimpPath **',
|
|
|
|
const_type => 'const GimpPath **',
|
2019-09-05 18:57:43 +08:00
|
|
|
array => 1,
|
|
|
|
init_value => 'NULL',
|
2024-07-12 14:16:25 +08:00
|
|
|
in_annotate => '(element-type GimpPath)',
|
|
|
|
out_annotate => '(element-type GimpPath) (transfer container)',
|
|
|
|
get_value_func => '$var = (const GimpPath **) gimp_value_get_object_array ($value)',
|
2021-08-26 23:18:32 +08:00
|
|
|
dup_value_func => '{ GimpObjectArray *a = g_value_get_boxed (gimp_value_array_index ($value)); if (a) $var = g_memdup2 (a->data, a->length * sizeof (gpointer)); }',
|
2024-07-12 14:16:25 +08:00
|
|
|
set_value_func => 'gimp_value_set_object_array ($value, GIMP_TYPE_PATH, (GObject **) $var, $var_len)',
|
|
|
|
take_value_func => 'gimp_value_take_object_array ($value, GIMP_TYPE_PATH, (GObject **) $var, $var_len)' },
|
2019-09-05 18:57:43 +08:00
|
|
|
|
2023-10-03 05:22:49 +08:00
|
|
|
resourcearray => { name => 'RESOURCEARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_OBJECT_ARRAY',
|
|
|
|
type => 'GimpResource **',
|
|
|
|
const_type => 'const GimpResource **',
|
|
|
|
array => 1,
|
|
|
|
init_value => 'NULL',
|
|
|
|
in_annotate => '(element-type GimpResource)',
|
|
|
|
out_annotate => '(element-type GimpResource) (transfer container)',
|
|
|
|
get_value_func => '$var = (const GimpResource **) gimp_value_get_object_array ($value)',
|
|
|
|
dup_value_func => '{ GimpObjectArray *a = g_value_get_boxed (gimp_value_array_index ($value)); if (a) $var = g_memdup2 (a->data, a->length * sizeof (gpointer)); }',
|
|
|
|
set_value_func => 'gimp_value_set_object_array ($value, GIMP_TYPE_RESOURCE, (GObject **) $var, $var_len)',
|
|
|
|
take_value_func => 'gimp_value_take_object_array ($value, GIMP_TYPE_RESOURCE, (GObject **) $var, $var_len)' },
|
|
|
|
|
|
|
|
brusharray => { name => 'BRUSHARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_OBJECT_ARRAY',
|
|
|
|
type => 'GimpBrush **',
|
|
|
|
const_type => 'const GimpBrush **',
|
|
|
|
array => 1,
|
|
|
|
init_value => 'NULL',
|
|
|
|
in_annotate => '(element-type GimpBrush)',
|
|
|
|
out_annotate => '(element-type GimpBrush) (transfer container)',
|
|
|
|
get_value_func => '$var = (const GimpBrush **) gimp_value_get_object_array ($value)',
|
|
|
|
dup_value_func => '{ GimpObjectArray *a = g_value_get_boxed (gimp_value_array_index ($value)); if (a) $var = g_memdup2 (a->data, a->length * sizeof (gpointer)); }',
|
|
|
|
set_value_func => 'gimp_value_set_object_array ($value, GIMP_TYPE_BRUSH, (GObject **) $var, $var_len)',
|
|
|
|
take_value_func => 'gimp_value_take_object_array ($value, GIMP_TYPE_BRUSH, (GObject **) $var, $var_len)' },
|
|
|
|
|
|
|
|
fontarray => { name => 'FONTARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_OBJECT_ARRAY',
|
|
|
|
type => 'GimpFont **',
|
|
|
|
const_type => 'const GimpFont **',
|
|
|
|
array => 1,
|
|
|
|
init_value => 'NULL',
|
|
|
|
in_annotate => '(element-type GimpFont)',
|
|
|
|
out_annotate => '(element-type GimpFont) (transfer container)',
|
|
|
|
get_value_func => '$var = (const GimpFont **) gimp_value_get_object_array ($value)',
|
|
|
|
dup_value_func => '{ GimpObjectArray *a = g_value_get_boxed (gimp_value_array_index ($value)); if (a) $var = g_memdup2 (a->data, a->length * sizeof (gpointer)); }',
|
|
|
|
set_value_func => 'gimp_value_set_object_array ($value, GIMP_TYPE_FONT, (GObject **) $var, $var_len)',
|
|
|
|
take_value_func => 'gimp_value_take_object_array ($value, GIMP_TYPE_FONT, (GObject **) $var, $var_len)' },
|
|
|
|
|
|
|
|
gradientarray => { name => 'GRADIENTARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_OBJECT_ARRAY',
|
|
|
|
type => 'GimpGradient **',
|
|
|
|
const_type => 'const GimpGradient **',
|
|
|
|
array => 1,
|
|
|
|
init_value => 'NULL',
|
|
|
|
in_annotate => '(element-type GimpGradient)',
|
|
|
|
out_annotate => '(element-type GimpGradient) (transfer container)',
|
|
|
|
get_value_func => '$var = (const GimpGradient **) gimp_value_get_object_array ($value)',
|
|
|
|
dup_value_func => '{ GimpObjectArray *a = g_value_get_boxed (gimp_value_array_index ($value)); if (a) $var = g_memdup2 (a->data, a->length * sizeof (gpointer)); }',
|
|
|
|
set_value_func => 'gimp_value_set_object_array ($value, GIMP_TYPE_GRADIENT, (GObject **) $var, $var_len)',
|
|
|
|
take_value_func => 'gimp_value_take_object_array ($value, GIMP_TYPE_GRADIENT, (GObject **) $var, $var_len)' },
|
|
|
|
|
|
|
|
palettearray => { name => 'PALETTEARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_OBJECT_ARRAY',
|
|
|
|
type => 'GimpPalette **',
|
|
|
|
const_type => 'const GimpPalette **',
|
|
|
|
array => 1,
|
|
|
|
init_value => 'NULL',
|
|
|
|
in_annotate => '(element-type GimpPalette)',
|
|
|
|
out_annotate => '(element-type GimpPalette) (transfer container)',
|
|
|
|
get_value_func => '$var = (const GimpPalette **) gimp_value_get_object_array ($value)',
|
|
|
|
dup_value_func => '{ GimpObjectArray *a = g_value_get_boxed (gimp_value_array_index ($value)); if (a) $var = g_memdup2 (a->data, a->length * sizeof (gpointer)); }',
|
|
|
|
set_value_func => 'gimp_value_set_object_array ($value, GIMP_TYPE_PALETTE, (GObject **) $var, $var_len)',
|
|
|
|
take_value_func => 'gimp_value_take_object_array ($value, GIMP_TYPE_PALETTE, (GObject **) $var, $var_len)' },
|
|
|
|
|
|
|
|
patternarray => { name => 'PATTERNARRAY',
|
|
|
|
gtype => 'GIMP_TYPE_OBJECT_ARRAY',
|
|
|
|
type => 'GimpPattern **',
|
|
|
|
const_type => 'const GimpPattern **',
|
|
|
|
array => 1,
|
|
|
|
init_value => 'NULL',
|
|
|
|
in_annotate => '(element-type GimpPattern)',
|
|
|
|
out_annotate => '(element-type GimpPattern) (transfer container)',
|
|
|
|
get_value_func => '$var = (const GimpPattern **) gimp_value_get_object_array ($value)',
|
|
|
|
dup_value_func => '{ GimpObjectArray *a = g_value_get_boxed (gimp_value_array_index ($value)); if (a) $var = g_memdup2 (a->data, a->length * sizeof (gpointer)); }',
|
|
|
|
set_value_func => 'gimp_value_set_object_array ($value, GIMP_TYPE_PATTERN, (GObject **) $var, $var_len)',
|
|
|
|
take_value_func => 'gimp_value_take_object_array ($value, GIMP_TYPE_PATTERN, (GObject **) $var, $var_len)' },
|
|
|
|
|
2023-11-04 04:26:51 +08: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 12:10:26 +08:00
|
|
|
take_value_func => 'g_value_take_object ($value, $var)',
|
|
|
|
headers => [ qw(<cairo.h> "libgimpcolor/gimpcolor.h") ] },
|
2023-11-04 04:26:51 +08:00
|
|
|
|
2019-07-30 16:39:56 +08:00
|
|
|
display => { name => 'DISPLAY',
|
2019-08-29 17:25:35 +08:00
|
|
|
gtype => 'GIMP_TYPE_DISPLAY',
|
2019-08-14 03:36:03 +08:00
|
|
|
type => 'GimpDisplay *',
|
|
|
|
const_type => 'GimpDisplay *',
|
2019-09-04 20:27:18 +08:00
|
|
|
app_type => 'GimpDisplay *',
|
|
|
|
app_const_type => 'GimpDisplay *',
|
2019-07-30 16:39:56 +08:00
|
|
|
init_value => 'NULL',
|
2019-08-15 16:14:38 +08:00
|
|
|
out_annotate => '(transfer none)',
|
2019-08-29 17:25:35 +08:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2019-09-04 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_DISPLAY ($value)',
|
2019-08-29 17:25:35 +08:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
2019-09-03 19:31:27 +08:00
|
|
|
take_value_func => 'g_value_set_object ($value, $var)' },
|
2019-07-30 16:39:56 +08:00
|
|
|
|
|
|
|
image => { name => 'IMAGE',
|
2019-08-29 17:25:35 +08:00
|
|
|
gtype => 'GIMP_TYPE_IMAGE',
|
2019-07-30 16:39:56 +08:00
|
|
|
type => 'GimpImage *',
|
|
|
|
const_type => 'GimpImage *',
|
|
|
|
init_value => 'NULL',
|
2019-08-15 16:01:08 +08:00
|
|
|
out_annotate => '(transfer none)',
|
2019-08-29 17:25:35 +08:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2019-09-04 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_IMAGE ($value)',
|
2019-08-29 17:25:35 +08:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2019-07-30 16:39:56 +08:00
|
|
|
headers => [ qw("core/gimpimage.h") ] },
|
|
|
|
|
|
|
|
item => { name => 'ITEM',
|
2019-08-29 17:25:35 +08:00
|
|
|
gtype => 'GIMP_TYPE_ITEM',
|
2019-07-30 16:39:56 +08:00
|
|
|
type => 'GimpItem *',
|
|
|
|
const_type => 'GimpItem *',
|
|
|
|
init_value => 'NULL',
|
2019-08-15 18:12:25 +08:00
|
|
|
out_annotate => '(transfer none)',
|
2019-08-29 17:25:35 +08:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2019-09-04 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_ITEM ($value)',
|
2019-08-29 17:25:35 +08:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2019-07-30 16:39:56 +08:00
|
|
|
headers => [ qw("core/gimpitem.h") ] },
|
|
|
|
|
|
|
|
layer => { name => 'LAYER',
|
2019-08-29 17:25:35 +08:00
|
|
|
gtype => 'GIMP_TYPE_LAYER',
|
2019-07-30 16:39:56 +08:00
|
|
|
type => 'GimpLayer *',
|
|
|
|
const_type => 'GimpLayer *',
|
|
|
|
init_value => 'NULL',
|
2019-08-15 18:12:25 +08:00
|
|
|
out_annotate => '(transfer none)',
|
2019-08-29 17:25:35 +08:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2019-09-04 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_LAYER ($value)',
|
2019-08-29 17:25:35 +08:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2019-07-30 16:39:56 +08:00
|
|
|
headers => [ qw("core/gimplayer.h") ] },
|
|
|
|
|
2022-09-30 22:21:47 +08: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") ] },
|
|
|
|
|
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 23:24:11 +08: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 16:39:56 +08:00
|
|
|
channel => { name => 'CHANNEL',
|
2019-08-29 17:25:35 +08:00
|
|
|
gtype => 'GIMP_TYPE_CHANNEL',
|
2019-07-30 16:39:56 +08:00
|
|
|
type => 'GimpChannel *',
|
|
|
|
const_type => 'GimpChannel *',
|
|
|
|
init_value => 'NULL',
|
2019-08-15 18:12:25 +08:00
|
|
|
out_annotate => '(transfer none)',
|
2019-08-29 17:25:35 +08:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2019-09-04 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_CHANNEL ($value)',
|
2019-08-29 17:25:35 +08:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2019-07-30 16:39:56 +08:00
|
|
|
headers => [ qw("core/gimpchannel.h") ] },
|
|
|
|
|
|
|
|
drawable => { name => 'DRAWABLE',
|
2019-08-29 17:25:35 +08:00
|
|
|
gtype => 'GIMP_TYPE_DRAWABLE',
|
2019-07-30 16:39:56 +08:00
|
|
|
type => 'GimpDrawable *',
|
|
|
|
const_type => 'GimpDrawable *',
|
|
|
|
init_value => 'NULL',
|
2019-08-15 18:12:25 +08:00
|
|
|
out_annotate => '(transfer none)',
|
2019-08-29 17:25:35 +08:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2019-09-04 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_DRAWABLE ($value)',
|
2019-08-29 17:25:35 +08:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2019-07-30 16:39:56 +08:00
|
|
|
headers => [ qw("core/gimpdrawable.h") ] },
|
|
|
|
|
|
|
|
selection => { name => 'SELECTION',
|
2019-08-29 17:25:35 +08:00
|
|
|
gtype => 'GIMP_TYPE_SELECTION',
|
2019-07-30 16:39:56 +08:00
|
|
|
type => 'GimpSelection *',
|
|
|
|
const_type => 'GimpSelection *',
|
|
|
|
init_value => 'NULL',
|
2019-08-15 18:12:25 +08:00
|
|
|
out_annotate => '(transfer none)',
|
2019-08-29 17:25:35 +08:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2019-09-04 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_SELECTION ($value)',
|
2019-08-29 17:25:35 +08:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2019-07-30 16:39:56 +08:00
|
|
|
headers => [ qw("core/gimpselection.h") ] },
|
|
|
|
|
|
|
|
layer_mask => { name => 'CHANNEL',
|
2019-08-29 17:25:35 +08:00
|
|
|
gtype => 'GIMP_TYPE_LAYER_MASK',
|
2019-07-30 16:39:56 +08:00
|
|
|
type => 'GimpLayerMask *',
|
|
|
|
const_type => 'GimpLayerMask *',
|
|
|
|
init_value => 'NULL',
|
2019-08-15 18:12:25 +08:00
|
|
|
out_annotate => '(transfer none)',
|
2019-08-29 17:25:35 +08:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2019-09-04 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_LAYER_MASK ($value)',
|
2019-08-29 17:25:35 +08:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2019-07-30 16:39:56 +08:00
|
|
|
headers => [ qw("core/gimplayermask.h") ] },
|
|
|
|
|
2024-07-12 14:16:25 +08:00
|
|
|
path => { name => 'PATH',
|
|
|
|
gtype => 'GIMP_TYPE_PATH',
|
|
|
|
type => 'GimpPath *',
|
|
|
|
const_type => 'GimpPath *',
|
2019-07-30 16:39:56 +08:00
|
|
|
init_value => 'NULL',
|
2019-08-15 18:12:25 +08:00
|
|
|
out_annotate => '(transfer none)',
|
2019-08-29 17:25:35 +08:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2024-07-12 14:16:25 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_PATH ($value)',
|
2019-08-29 17:25:35 +08:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2024-07-12 14:16:25 +08:00
|
|
|
headers => [ qw("vectors/gimppath.h") ] },
|
2019-07-30 16:39:56 +08:00
|
|
|
|
2019-09-12 03:48:34 +08: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)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)' },
|
|
|
|
|
2019-07-30 16:39:56 +08:00
|
|
|
parasite => { name => 'PARASITE',
|
|
|
|
gtype => 'GIMP_TYPE_PARASITE',
|
|
|
|
type => 'GimpParasite *',
|
|
|
|
const_type => 'const GimpParasite *',
|
|
|
|
init_value => 'NULL',
|
2019-08-01 00:58:52 +08:00
|
|
|
out_annotate => '(transfer full)',
|
2019-07-30 16:39:56 +08:00
|
|
|
get_value_func => '$var = g_value_get_boxed ($value)',
|
2019-09-04 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_DUP_PARASITE ($value)',
|
2019-07-30 16:39:56 +08: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 13:19:30 +08:00
|
|
|
|
2019-08-05 16:46:55 +08: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 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_DUP_PARAM ($value)',
|
2019-08-05 16:46:55 +08:00
|
|
|
set_value_func => 'g_value_set_param ($value, $var)',
|
|
|
|
take_value_func => 'g_value_take_param ($value, $var)' },
|
|
|
|
|
1998-10-24 13:19:30 +08:00
|
|
|
# Special cases
|
2019-08-15 22:41:39 +08:00
|
|
|
enum => { name => 'ENUM',
|
2019-07-30 16:39:56 +08:00
|
|
|
gtype => 'G_TYPE_ENUM',
|
2019-08-15 20:04:56 +08:00
|
|
|
type => 'gint ',
|
|
|
|
const_type => 'gint ',
|
2019-07-30 16:39:56 +08:00
|
|
|
init_value => '0',
|
|
|
|
get_value_func => '$var = g_value_get_enum ($value)',
|
2019-09-04 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_ENUM ($value)',
|
2019-07-30 16:39:56 +08:00
|
|
|
set_value_func => 'g_value_set_enum ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_enum ($value, $var)' },
|
|
|
|
|
2019-08-15 22:41:39 +08:00
|
|
|
boolean => { name => 'BOOLEAN',
|
2019-07-30 16:39:56 +08: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 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_BOOLEAN ($value)',
|
2019-07-30 16:39:56 +08:00
|
|
|
set_value_func => 'g_value_set_boolean ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_boolean ($value, $var)' },
|
|
|
|
|
2019-08-15 22:41:39 +08:00
|
|
|
tattoo => { name => 'TATTOO',
|
|
|
|
gtype => 'G_TYPE_UINT',
|
|
|
|
type => 'guint ',
|
|
|
|
const_type => 'guint ',
|
2019-07-30 16:39:56 +08:00
|
|
|
init_value => '0',
|
|
|
|
get_value_func => '$var = g_value_get_uint ($value)',
|
2019-09-04 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_UINT ($value)',
|
2019-07-30 16:39:56 +08:00
|
|
|
set_value_func => 'g_value_set_uint ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_uint ($value, $var)' },
|
|
|
|
|
2019-08-15 22:41:39 +08:00
|
|
|
guide => { name => 'GUIDE',
|
|
|
|
gtype => 'G_TYPE_UINT',
|
|
|
|
type => 'guint ',
|
|
|
|
const_type => 'guint ',
|
2019-07-30 16:39:56 +08:00
|
|
|
init_value => '0',
|
|
|
|
get_value_func => '$var = g_value_get_uint ($value)',
|
2019-09-04 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_UINT ($value)',
|
2019-07-30 16:39:56 +08:00
|
|
|
set_value_func => 'g_value_set_uint ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_uint ($value, $var)' },
|
|
|
|
|
2019-08-15 22:41:39 +08:00
|
|
|
sample_point => { name => 'SAMPLE_POINT',
|
|
|
|
gtype => 'G_TYPE_UINT',
|
|
|
|
type => 'guint ',
|
|
|
|
const_type => 'guint ',
|
2019-07-30 16:39:56 +08:00
|
|
|
init_value => '0',
|
|
|
|
get_value_func => '$var = g_value_get_uint ($value)',
|
2019-09-04 08:49:33 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_UINT ($value)',
|
2019-07-30 16:39:56 +08:00
|
|
|
set_value_func => 'g_value_set_uint ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_uint ($value, $var)' },
|
|
|
|
|
2024-05-07 02:38:12 +08: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 21:06:27 +08:00
|
|
|
in_annotate => '(nullable)',
|
|
|
|
out_annotate => '(transfer full)',
|
2024-05-07 02:38:12 +08: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 22:41:39 +08:00
|
|
|
unit => { name => 'UNIT',
|
2019-07-30 16:39:56 +08: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-26 02:55:21 +08:00
|
|
|
type => 'GimpUnit *',
|
|
|
|
const_type => 'GimpUnit *',
|
|
|
|
init_value => 'NULL',
|
2019-08-05 21:31:12 +08: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-26 02:55:21 +08: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-06 07:28:35 +08:00
|
|
|
|
2023-05-31 22:12:04 +08:00
|
|
|
resource => { name => 'RESOURCE',
|
|
|
|
gtype => 'GIMP_TYPE_RESOURCE',
|
|
|
|
type => 'GimpResource *',
|
|
|
|
const_type => 'GimpResource *',
|
|
|
|
init_value => 'NULL',
|
2023-07-11 22:13:36 +08:00
|
|
|
out_annotate => '(transfer none)',
|
2023-05-31 22:12:04 +08: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-06 07:28:35 +08:00
|
|
|
brush => { name => 'BRUSH',
|
|
|
|
gtype => 'GIMP_TYPE_BRUSH',
|
|
|
|
type => 'GimpBrush *',
|
|
|
|
const_type => 'GimpBrush *',
|
|
|
|
init_value => 'NULL',
|
2023-07-11 22:13:36 +08:00
|
|
|
out_annotate => '(transfer none)',
|
2022-09-06 07:28:35 +08: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 22:12:04 +08:00
|
|
|
|
|
|
|
pattern => { name => 'PATTERN',
|
|
|
|
gtype => 'GIMP_TYPE_PATTERN',
|
|
|
|
type => 'GimpPattern *',
|
|
|
|
const_type => 'GimpPattern *',
|
2022-09-06 07:28:35 +08:00
|
|
|
init_value => 'NULL',
|
2023-07-11 22:13:36 +08:00
|
|
|
out_annotate => '(transfer none)',
|
2022-09-06 07:28:35 +08:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2023-05-31 22:12:04 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_PATTERN ($value)',
|
2022-09-06 07:28:35 +08:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2023-05-31 22:12:04 +08:00
|
|
|
headers => [ qw("core/gimppattern.h") ] },
|
2022-09-06 07:28:35 +08:00
|
|
|
|
|
|
|
gradient => { name => 'GRADIENT',
|
|
|
|
gtype => 'GIMP_TYPE_GRADIENT',
|
|
|
|
type => 'GimpGradient *',
|
|
|
|
const_type => 'GimpGradient *',
|
|
|
|
init_value => 'NULL',
|
2023-07-11 22:13:36 +08:00
|
|
|
out_annotate => '(transfer none)',
|
2022-09-06 07:28:35 +08: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 22:13:36 +08:00
|
|
|
out_annotate => '(transfer none)',
|
2022-09-06 07:28:35 +08: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 22:12:04 +08:00
|
|
|
font => { name => 'FONT',
|
|
|
|
gtype => 'GIMP_TYPE_FONT',
|
|
|
|
type => 'GimpFont *',
|
|
|
|
const_type => 'GimpFont *',
|
2022-09-06 07:28:35 +08:00
|
|
|
init_value => 'NULL',
|
2023-07-11 22:13:36 +08:00
|
|
|
out_annotate => '(transfer none)',
|
2022-09-06 07:28:35 +08:00
|
|
|
get_value_func => '$var = g_value_get_object ($value)',
|
2023-05-31 22:12:04 +08:00
|
|
|
dup_value_func => '$var = GIMP_VALUES_GET_FONT ($value)',
|
2022-09-06 07:28:35 +08:00
|
|
|
set_value_func => 'g_value_set_object ($value, $var)',
|
|
|
|
take_value_func => 'g_value_set_object ($value, $var)',
|
2023-05-31 22:12:04 +08:00
|
|
|
headers => [ qw("text/gimpfont.h") ] }
|
1998-10-24 13:19:30 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
# Split out the parts of an arg constraint
|
|
|
|
sub arg_parse {
|
|
|
|
my $arg = shift;
|
1999-03-18 07:08:08 +08:00
|
|
|
|
|
|
|
if ($arg =~ /^enum (\w+)(.*)/) {
|
|
|
|
my ($name, $remove) = ($1, $2);
|
|
|
|
my @retvals = ('enum', $name);
|
|
|
|
|
1999-03-28 14:36:11 +08:00
|
|
|
if ($remove && $remove =~ m@ \(no @) {
|
|
|
|
chop $remove; ($remove = substr($remove, 5)) =~ s/ $//;
|
1999-03-18 07:08:08 +08:00
|
|
|
push @retvals, split(/,\s*/, $remove);
|
|
|
|
}
|
|
|
|
|
|
|
|
return @retvals;
|
1998-10-24 13:19:30 +08:00
|
|
|
}
|
1999-04-27 12:33:41 +08:00
|
|
|
elsif ($arg =~ /^unit(?: \(min (.*?)\))?/) {
|
|
|
|
my @retvals = ('unit');
|
|
|
|
push @retvals, $1 if $1;
|
|
|
|
return @retvals;
|
|
|
|
}
|
2007-07-05 22:31:42 +08:00
|
|
|
elsif ($arg =~ /^(?:([+-.\dA-Z_][^\s]*) \s* (<=|<))?
|
1999-03-21 10:14:08 +08:00
|
|
|
\s* (\w+) \s*
|
2007-07-05 22:31:42 +08:00
|
|
|
(?:(<=|<) \s* ([+-.\dA-Z_][^\s]*))?
|
1999-03-20 07:04:16 +08:00
|
|
|
/x) {
|
2010-06-06 01:26:06 +08:00
|
|
|
return ($3, $1, $2, $5, $4);
|
1998-10-24 13:19:30 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1999-04-04 13:59:08 +08:00
|
|
|
1;
|