Commit 4fa08458 authored by Michael Natterer's avatar Michael Natterer 😴

pdb: remove int16 from the PDB types and rename int8 to uchar

parent 652fd758
Pipeline #104848 passed with stages
in 26 minutes and 26 seconds
...@@ -405,10 +405,10 @@ plug_in_alienmap2_invoker (GimpProcedure *procedure, ...@@ -405,10 +405,10 @@ plug_in_alienmap2_invoker (GimpProcedure *procedure,
gdouble greenangle; gdouble greenangle;
gdouble bluefrequency; gdouble bluefrequency;
gdouble blueangle; gdouble blueangle;
guint8 colormodel; guchar colormodel;
guint8 redmode; guchar redmode;
guint8 greenmode; guchar greenmode;
guint8 bluemode; guchar bluemode;
drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp); drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
redfrequency = g_value_get_double (gimp_value_array_index (args, 3)); redfrequency = g_value_get_double (gimp_value_array_index (args, 3));
...@@ -1725,15 +1725,15 @@ plug_in_exchange_invoker (GimpProcedure *procedure, ...@@ -1725,15 +1725,15 @@ plug_in_exchange_invoker (GimpProcedure *procedure,
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpDrawable *drawable; GimpDrawable *drawable;
guint8 from_red; guchar from_red;
guint8 from_green; guchar from_green;
guint8 from_blue; guchar from_blue;
guint8 to_red; guchar to_red;
guint8 to_green; guchar to_green;
guint8 to_blue; guchar to_blue;
guint8 red_threshold; guchar red_threshold;
guint8 green_threshold; guchar green_threshold;
guint8 blue_threshold; guchar blue_threshold;
drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp); drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
from_red = g_value_get_uchar (gimp_value_array_index (args, 3)); from_red = g_value_get_uchar (gimp_value_array_index (args, 3));
...@@ -2345,10 +2345,10 @@ plug_in_maze_invoker (GimpProcedure *procedure, ...@@ -2345,10 +2345,10 @@ plug_in_maze_invoker (GimpProcedure *procedure,
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpDrawable *drawable; GimpDrawable *drawable;
gint16 width; gint width;
gint16 height; gint height;
guint8 tileable; guchar tileable;
guint8 algorithm; guchar algorithm;
gint seed; gint seed;
drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp); drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
...@@ -7056,13 +7056,13 @@ register_plug_in_compat_procs (GimpPDB *pdb) ...@@ -7056,13 +7056,13 @@ register_plug_in_compat_procs (GimpPDB *pdb)
g_param_spec_int ("multiple", g_param_spec_int ("multiple",
"multiple", "multiple",
"Multiple (use 57)", "Multiple (use 57)",
G_MININT16, G_MAXINT16, 0, G_MININT32, G_MAXINT32, 0,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_int ("offset", g_param_spec_int ("offset",
"offset", "offset",
"Offset (use 1)", "Offset (use 1)",
G_MININT16, G_MAXINT16, 0, G_MININT32, G_MAXINT32, 0,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
......
...@@ -392,7 +392,7 @@ g_param_spec_int ("$name", ...@@ -392,7 +392,7 @@ g_param_spec_int ("$name",
$flags) $flags)
CODE CODE
} }
elsif ($pdbtype eq 'int8') { elsif ($pdbtype eq 'uchar') {
if (defined $typeinfo[0]) { if (defined $typeinfo[0]) {
$min = ($typeinfo[1] eq '<') ? ($typeinfo[0] + 1) : $typeinfo[0]; $min = ($typeinfo[1] eq '<') ? ($typeinfo[0] + 1) : $typeinfo[0];
} }
......
...@@ -45,13 +45,13 @@ HELP ...@@ -45,13 +45,13 @@ HELP
desc => 'Blue/luminance component frequency factor' }, desc => 'Blue/luminance component frequency factor' },
{ name => 'blueangle', type => '0 <= float <= 360', { name => 'blueangle', type => '0 <= float <= 360',
desc => 'Blue/luminance component angle factor (0-360)' }, desc => 'Blue/luminance component angle factor (0-360)' },
{ name => 'colormodel', type => '0 <= int8 <= 1', { name => 'colormodel', type => '0 <= uchar <= 1',
desc => 'Color model { RGB-MODEL (0), HSL-MODEL (1) }' }, desc => 'Color model { RGB-MODEL (0), HSL-MODEL (1) }' },
{ name => 'redmode', type => '0 <= int8 <= 1', { name => 'redmode', type => '0 <= uchar <= 1',
desc => 'Red/hue application mode { TRUE, FALSE }' }, desc => 'Red/hue application mode { TRUE, FALSE }' },
{ name => 'greenmode', type => '0 <= int8 <= 1', { name => 'greenmode', type => '0 <= uchar <= 1',
desc => 'Green/saturation application mode { TRUE, FALSE }' }, desc => 'Green/saturation application mode { TRUE, FALSE }' },
{ name => 'bluemode', type => '0 <= int8 <= 1', { name => 'bluemode', type => '0 <= uchar <= 1',
desc => 'Blue/luminance application mode { TRUE, FALSE }' } desc => 'Blue/luminance application mode { TRUE, FALSE }' }
); );
...@@ -1542,23 +1542,23 @@ HELP ...@@ -1542,23 +1542,23 @@ HELP
{ name => 'drawable', type => 'drawable', { name => 'drawable', type => 'drawable',
desc => 'Input drawable' }, desc => 'Input drawable' },
{ name => 'from_red', type => 'int8', { name => 'from_red', type => 'uchar',
desc => 'Red value (from)' }, desc => 'Red value (from)' },
{ name => 'from_green', type => 'int8', { name => 'from_green', type => 'uchar',
desc => 'Green value (from)' }, desc => 'Green value (from)' },
{ name => 'from_blue', type => 'int8', { name => 'from_blue', type => 'uchar',
desc => 'Blue value (from)' }, desc => 'Blue value (from)' },
{ name => 'to_red', type => 'int8', { name => 'to_red', type => 'uchar',
desc => 'Red value (to)' }, desc => 'Red value (to)' },
{ name => 'to_green', type => 'int8', { name => 'to_green', type => 'uchar',
desc => 'Green value (to)' }, desc => 'Green value (to)' },
{ name => 'to_blue', type => 'int8', { name => 'to_blue', type => 'uchar',
desc => 'Blue value (to)' }, desc => 'Blue value (to)' },
{ name => 'red_threshold', type => 'int8', { name => 'red_threshold', type => 'uchar',
desc => 'Red threshold' }, desc => 'Red threshold' },
{ name => 'green_threshold', type => 'int8', { name => 'green_threshold', type => 'uchar',
desc => 'Green threshold' }, desc => 'Green threshold' },
{ name => 'blue_threshold', type => 'int8', { name => 'blue_threshold', type => 'uchar',
desc => 'Blue threshold' } desc => 'Blue threshold' }
); );
...@@ -2273,19 +2273,19 @@ HELP ...@@ -2273,19 +2273,19 @@ HELP
desc => 'Input image (unused)' }, desc => 'Input image (unused)' },
{ name => 'drawable', type => 'drawable', { name => 'drawable', type => 'drawable',
desc => 'Input drawable' }, desc => 'Input drawable' },
{ name => 'width', type => '1 <= int16 <= 1024', { name => 'width', type => '1 <= int32 <= 1024',
desc => 'Width of the passages' }, desc => 'Width of the passages' },
{ name => 'height', type => '1 <= int16 <= 1024', { name => 'height', type => '1 <= int32 <= 1024',
desc => 'Height of the passages' }, desc => 'Height of the passages' },
{ name => 'tileable', type => '0 <= int8 <= 1', { name => 'tileable', type => '0 <= uchar <= 1',
desc => 'Tileable maze? (TRUE or FALSE)' }, desc => 'Tileable maze? (TRUE or FALSE)' },
{ name => 'algorithm', type => '0 <= int8 <= 1', { name => 'algorithm', type => '0 <= uchar <= 1',
desc => 'Generation algorithm (0 = DEPTH FIRST, 1 = PRIM\'S ALGORITHM)' }, desc => 'Generation algorithm (0 = DEPTH FIRST, 1 = PRIM\'S ALGORITHM)' },
{ name => 'seed', type => 'int32', { name => 'seed', type => 'int32',
desc => 'Random Seed' }, desc => 'Random Seed' },
{ name => 'multiple', type => 'int16', dead => 1, { name => 'multiple', type => 'int32', dead => 1,
desc => 'Multiple (use 57)' }, desc => 'Multiple (use 57)' },
{ name => 'offset', type => 'int16', dead => 1, { name => 'offset', type => 'int32', dead => 1,
desc => 'Offset (use 1)' } desc => 'Offset (use 1)' }
); );
......
...@@ -27,20 +27,10 @@ package Gimp::CodeGen::pdb; ...@@ -27,20 +27,10 @@ package Gimp::CodeGen::pdb;
set_value_func => 'g_value_set_int ($value, $var)', set_value_func => 'g_value_set_int ($value, $var)',
take_value_func => 'g_value_set_int ($value, $var)' }, take_value_func => 'g_value_set_int ($value, $var)' },
int16 => { name => 'INT16', uchar => { name => 'UCHAR',
gtype => 'G_TYPE_INT',
type => 'gint16 ',
const_type => 'gint16 ',
init_value => '0',
get_value_func => '$var = g_value_get_int ($value)',
dup_value_func => '$var = g_value_get_int ($value)',
set_value_func => 'g_value_set_int ($value, $var)',
take_value_func => 'g_value_set_int ($value, $var)' },
int8 => { name => 'INT8',
gtype => 'G_TYPE_UCHAR', gtype => 'G_TYPE_UCHAR',
type => 'guint8 ', type => 'guchar ',
const_type => 'guint8 ', const_type => 'guchar ',
init_value => '0', init_value => '0',
get_value_func => '$var = g_value_get_uchar ($value)', get_value_func => '$var = g_value_get_uchar ($value)',
dup_value_func => '$var = g_value_get_uchar ($value)', dup_value_func => '$var = g_value_get_uchar ($value)',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment