removed GimpChannelLutType enum and export GimpHistogramChannel to the

2004-01-13  Michael Natterer  <mitch@gimp.org>

	* app/base/base-enums.h: removed GimpChannelLutType enum and
	export GimpHistogramChannel to the PDB. The removed enum was just
	there for libgimp compatibility.

	* tools/pdbgen/pdb/color.pdb: changed accordingly.

	* libgimp/gimpcompat.h
	* plug-ins/script-fu/siod-wrapper.c: added compat cruft.

	* app/pdb/color_cmds.c
	* libgimp/gimpcolor_pdb.[ch]
	* libgimp/gimpenums.h
	* plug-ins/pygimp/gimpenums.py
	* plug-ins/script-fu/script-fu-constants.c
	* tools/pdbgen/enums.pl: regenerated.
This commit is contained in:
Michael Natterer 2004-01-13 16:19:50 +00:00 committed by Michael Natterer
parent 7c5a13fef5
commit 8394e9e0f1
12 changed files with 173 additions and 139 deletions

View File

@ -1,3 +1,21 @@
2004-01-13 Michael Natterer <mitch@gimp.org>
* app/base/base-enums.h: removed GimpChannelLutType enum and
export GimpHistogramChannel to the PDB. The removed enum was just
there for libgimp compatibility.
* tools/pdbgen/pdb/color.pdb: changed accordingly.
* libgimp/gimpcompat.h
* plug-ins/script-fu/siod-wrapper.c: added compat cruft.
* app/pdb/color_cmds.c
* libgimp/gimpcolor_pdb.[ch]
* libgimp/gimpenums.h
* plug-ins/pygimp/gimpenums.py
* plug-ins/script-fu/script-fu-constants.c
* tools/pdbgen/enums.pl: regenerated.
2004-01-13 Sven Neumann <sven@gimp.org>
* libgimp/gimpcompat.h: fixed definition of gimp_use_xshm().

View File

@ -77,7 +77,7 @@ typedef enum /*< pdb-skip >*/
GType gimp_histogram_channel_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
typedef enum
{
GIMP_HISTOGRAM_VALUE = 0, /*< desc="Value" >*/
GIMP_HISTOGRAM_RED = 1, /*< desc="Red" >*/
@ -157,16 +157,6 @@ typedef enum /*< skip >*/
GIMP_NEGATIVE_CONVOL /* add 127 to values */
} GimpConvolutionType;
typedef enum /*< skip >*/
{
GIMP_VALUE_LUT,
GIMP_RED_LUT,
GIMP_GREEN_LUT,
GIMP_BLUE_LUT,
GIMP_ALPHA_LUT,
GIMP_GRAY_LUT = 0 /*< pdb-skip, skip >*/
} GimpChannelLutType;
typedef enum /*< skip >*/
{
GIMP_ALL_HUES,

View File

@ -91,7 +91,7 @@ gimp_brightness_contrast (gint32 drawable_ID,
*/
gboolean
gimp_levels (gint32 drawable_ID,
GimpChannelLutType channel,
GimpHistogramChannel channel,
gint low_input,
gint high_input,
gdouble gamma,
@ -308,7 +308,7 @@ gimp_invert (gint32 drawable_ID)
*/
gboolean
gimp_curves_spline (gint32 drawable_ID,
GimpChannelLutType channel,
GimpHistogramChannel channel,
gint num_points,
const guint8 *control_pts)
{
@ -352,7 +352,7 @@ gimp_curves_spline (gint32 drawable_ID,
*/
gboolean
gimp_curves_explicit (gint32 drawable_ID,
GimpChannelLutType channel,
GimpHistogramChannel channel,
gint num_bytes,
const guint8 *curve)
{
@ -460,7 +460,7 @@ gimp_color_balance (gint32 drawable_ID,
*/
gboolean
gimp_histogram (gint32 drawable_ID,
GimpChannelLutType channel,
GimpHistogramChannel channel,
gint start_range,
gint end_range,
gdouble *mean,

View File

@ -33,7 +33,7 @@ gboolean gimp_brightness_contrast (gint32 drawable_ID,
gint brightness,
gint contrast);
gboolean gimp_levels (gint32 drawable_ID,
GimpChannelLutType channel,
GimpHistogramChannel channel,
gint low_input,
gint high_input,
gdouble gamma,
@ -47,11 +47,11 @@ gboolean gimp_equalize (gint32 drawable_ID,
gboolean mask_only);
gboolean gimp_invert (gint32 drawable_ID);
gboolean gimp_curves_spline (gint32 drawable_ID,
GimpChannelLutType channel,
GimpHistogramChannel channel,
gint num_points,
const guint8 *control_pts);
gboolean gimp_curves_explicit (gint32 drawable_ID,
GimpChannelLutType channel,
GimpHistogramChannel channel,
gint num_bytes,
const guint8 *curve);
gboolean gimp_color_balance (gint32 drawable_ID,
@ -61,7 +61,7 @@ gboolean gimp_color_balance (gint32 drawable_ID,
gdouble magenta_green,
gdouble yellow_blue);
gboolean gimp_histogram (gint32 drawable_ID,
GimpChannelLutType channel,
GimpHistogramChannel channel,
gint start_range,
gint end_range,
gdouble *mean,

View File

@ -208,6 +208,15 @@ enum
GIMP_SPIRAL_ANTICLOCKWISE = GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE
};
enum
{
GIMP_VALUE_LUT = GIMP_HISTOGRAM_VALUE,
GIMP_RED_LUT = GIMP_HISTOGRAM_RED,
GIMP_GREEN_LUT = GIMP_HISTOGRAM_GREEN,
GIMP_BLUE_LUT = GIMP_HISTOGRAM_BLUE,
GIMP_ALPHA_LUT = GIMP_HISTOGRAM_ALPHA
};
#endif /* GIMP_DISABLE_DEPRECATED */

View File

@ -55,15 +55,6 @@ typedef enum
GIMP_PATTERN_BUCKET_FILL
} GimpBucketFillMode;
typedef enum
{
GIMP_VALUE_LUT,
GIMP_RED_LUT,
GIMP_GREEN_LUT,
GIMP_BLUE_LUT,
GIMP_ALPHA_LUT
} GimpChannelLutType;
typedef enum
{
GIMP_CHANNEL_OP_ADD,
@ -148,6 +139,15 @@ typedef enum
GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE
} GimpGradientType;
typedef enum
{
GIMP_HISTOGRAM_VALUE,
GIMP_HISTOGRAM_RED,
GIMP_HISTOGRAM_GREEN,
GIMP_HISTOGRAM_BLUE,
GIMP_HISTOGRAM_ALPHA
} GimpHistogramChannel;
typedef enum
{
GIMP_ALL_HUES,

View File

@ -56,13 +56,6 @@ FG_BUCKET_FILL = 0
BG_BUCKET_FILL = 1
PATTERN_BUCKET_FILL = 2
# GimpChannelLutType
VALUE_LUT = 0
RED_LUT = 1
GREEN_LUT = 2
BLUE_LUT = 3
ALPHA_LUT = 4
# GimpChannelOps
CHANNEL_OP_ADD = 0
CHANNEL_OP_SUBTRACT = 1
@ -127,6 +120,13 @@ GRADIENT_SHAPEBURST_DIMPLED = 8
GRADIENT_SPIRAL_CLOCKWISE = 9
GRADIENT_SPIRAL_ANTICLOCKWISE = 10
# GimpHistogramChannel
HISTOGRAM_VALUE = 0
HISTOGRAM_RED = 1
HISTOGRAM_GREEN = 2
HISTOGRAM_BLUE = 3
HISTOGRAM_ALPHA = 4
# GimpHueRange
ALL_HUES = 0
RED_HUES = 1

View File

@ -281,12 +281,12 @@ init_constants (void)
setvar (cintern ("BLUR"), flocons (GIMP_BLUR_CONVOLVE), NIL);
setvar (cintern ("SHARPEN"), flocons (GIMP_SHARPEN_CONVOLVE), NIL);
setvar (cintern ("RGB_IMAGE"), flocons (GIMP_RGB_IMAGE), NIL);
setvar (cintern ("RGBA_IMAGE"), flocons (GIMP_RGBA_IMAGE), NIL);
setvar (cintern ("GRAY_IMAGE"), flocons (GIMP_GRAY_IMAGE), NIL);
setvar (cintern ("GRAYA_IMAGE"), flocons (GIMP_GRAYA_IMAGE), NIL);
setvar (cintern ("INDEXED_IMAGE"), flocons (GIMP_INDEXED_IMAGE), NIL);
setvar (cintern ("INDEXEDA_IMAGE"), flocons (GIMP_INDEXEDA_IMAGE), NIL);
setvar (cintern ("RGB-IMAGE"), flocons (GIMP_RGB_IMAGE), NIL);
setvar (cintern ("RGBA-IMAGE"), flocons (GIMP_RGBA_IMAGE), NIL);
setvar (cintern ("GRAY-IMAGE"), flocons (GIMP_GRAY_IMAGE), NIL);
setvar (cintern ("GRAYA-IMAGE"), flocons (GIMP_GRAYA_IMAGE), NIL);
setvar (cintern ("INDEXED-IMAGE"), flocons (GIMP_INDEXED_IMAGE), NIL);
setvar (cintern ("INDEXEDA-IMAGE"), flocons (GIMP_INDEXEDA_IMAGE), NIL);
setvar (cintern ("WHITE-MASK"), flocons (GIMP_ADD_WHITE_MASK), NIL);
setvar (cintern ("BLACK-MASK"), flocons (GIMP_ADD_BLACK_MASK), NIL);
@ -332,6 +332,12 @@ init_constants (void)
setvar (cintern ("SPIRAL-CLOCKWISE"), flocons (GIMP_GRADIENT_SPIRAL_CLOCKWISE), NIL);
setvar (cintern ("SPIRAL-ANTICLOCKWISE"), flocons (GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE), NIL);
setvar (cintern ("VALUE-LUT"), flocons (GIMP_HISTOGRAM_VALUE), NIL);
setvar (cintern ("RED-LUT"), flocons (GIMP_HISTOGRAM_RED), NIL);
setvar (cintern ("GREEN-LUT"), flocons (GIMP_HISTOGRAM_GREEN), NIL);
setvar (cintern ("BLUE-LUT"), flocons (GIMP_HISTOGRAM_BLUE), NIL);
setvar (cintern ("ALPHA-LUT"), flocons (GIMP_HISTOGRAM_ALPHA), NIL);
/* Useful misc stuff */
setvar (cintern ("TRUE"), flocons (TRUE), NIL);
setvar (cintern ("FALSE"), flocons (FALSE), NIL);

View File

@ -42,12 +42,6 @@ init_generated_constants (void)
setvar (cintern ("BG-BUCKET-FILL"), flocons (1), NIL);
setvar (cintern ("PATTERN-BUCKET-FILL"), flocons (2), NIL);
setvar (cintern ("VALUE-LUT"), flocons (0), NIL);
setvar (cintern ("RED-LUT"), flocons (1), NIL);
setvar (cintern ("GREEN-LUT"), flocons (2), NIL);
setvar (cintern ("BLUE-LUT"), flocons (3), NIL);
setvar (cintern ("ALPHA-LUT"), flocons (4), NIL);
setvar (cintern ("CHANNEL-OP-ADD"), flocons (0), NIL);
setvar (cintern ("CHANNEL-OP-SUBTRACT"), flocons (1), NIL);
setvar (cintern ("CHANNEL-OP-REPLACE"), flocons (2), NIL);
@ -102,6 +96,12 @@ init_generated_constants (void)
setvar (cintern ("GRADIENT-SPIRAL-CLOCKWISE"), flocons (9), NIL);
setvar (cintern ("GRADIENT-SPIRAL-ANTICLOCKWISE"), flocons (10), NIL);
setvar (cintern ("HISTOGRAM-VALUE"), flocons (0), NIL);
setvar (cintern ("HISTOGRAM-RED"), flocons (1), NIL);
setvar (cintern ("HISTOGRAM-GREEN"), flocons (2), NIL);
setvar (cintern ("HISTOGRAM-BLUE"), flocons (3), NIL);
setvar (cintern ("HISTOGRAM-ALPHA"), flocons (4), NIL);
setvar (cintern ("ALL-HUES"), flocons (0), NIL);
setvar (cintern ("RED-HUES"), flocons (1), NIL);
setvar (cintern ("YELLOW-HUES"), flocons (2), NIL);

View File

@ -281,12 +281,12 @@ init_constants (void)
setvar (cintern ("BLUR"), flocons (GIMP_BLUR_CONVOLVE), NIL);
setvar (cintern ("SHARPEN"), flocons (GIMP_SHARPEN_CONVOLVE), NIL);
setvar (cintern ("RGB_IMAGE"), flocons (GIMP_RGB_IMAGE), NIL);
setvar (cintern ("RGBA_IMAGE"), flocons (GIMP_RGBA_IMAGE), NIL);
setvar (cintern ("GRAY_IMAGE"), flocons (GIMP_GRAY_IMAGE), NIL);
setvar (cintern ("GRAYA_IMAGE"), flocons (GIMP_GRAYA_IMAGE), NIL);
setvar (cintern ("INDEXED_IMAGE"), flocons (GIMP_INDEXED_IMAGE), NIL);
setvar (cintern ("INDEXEDA_IMAGE"), flocons (GIMP_INDEXEDA_IMAGE), NIL);
setvar (cintern ("RGB-IMAGE"), flocons (GIMP_RGB_IMAGE), NIL);
setvar (cintern ("RGBA-IMAGE"), flocons (GIMP_RGBA_IMAGE), NIL);
setvar (cintern ("GRAY-IMAGE"), flocons (GIMP_GRAY_IMAGE), NIL);
setvar (cintern ("GRAYA-IMAGE"), flocons (GIMP_GRAYA_IMAGE), NIL);
setvar (cintern ("INDEXED-IMAGE"), flocons (GIMP_INDEXED_IMAGE), NIL);
setvar (cintern ("INDEXEDA-IMAGE"), flocons (GIMP_INDEXEDA_IMAGE), NIL);
setvar (cintern ("WHITE-MASK"), flocons (GIMP_ADD_WHITE_MASK), NIL);
setvar (cintern ("BLACK-MASK"), flocons (GIMP_ADD_BLACK_MASK), NIL);
@ -332,6 +332,12 @@ init_constants (void)
setvar (cintern ("SPIRAL-CLOCKWISE"), flocons (GIMP_GRADIENT_SPIRAL_CLOCKWISE), NIL);
setvar (cintern ("SPIRAL-ANTICLOCKWISE"), flocons (GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE), NIL);
setvar (cintern ("VALUE-LUT"), flocons (GIMP_HISTOGRAM_VALUE), NIL);
setvar (cintern ("RED-LUT"), flocons (GIMP_HISTOGRAM_RED), NIL);
setvar (cintern ("GREEN-LUT"), flocons (GIMP_HISTOGRAM_GREEN), NIL);
setvar (cintern ("BLUE-LUT"), flocons (GIMP_HISTOGRAM_BLUE), NIL);
setvar (cintern ("ALPHA-LUT"), flocons (GIMP_HISTOGRAM_ALPHA), NIL);
/* Useful misc stuff */
setvar (cintern ("TRUE"), flocons (TRUE), NIL);
setvar (cintern ("FALSE"), flocons (FALSE), NIL);

View File

@ -107,6 +107,18 @@ package Gimp::CodeGen::enums;
GIMP_STACK_TRACE_QUERY => '1',
GIMP_STACK_TRACE_ALWAYS => '2' }
},
GimpHistogramChannel =>
{ contig => 1,
header => 'base/base-enums.h',
symbols => [ qw(GIMP_HISTOGRAM_VALUE GIMP_HISTOGRAM_RED
GIMP_HISTOGRAM_GREEN GIMP_HISTOGRAM_BLUE
GIMP_HISTOGRAM_ALPHA) ],
mapping => { GIMP_HISTOGRAM_VALUE => '0',
GIMP_HISTOGRAM_RED => '1',
GIMP_HISTOGRAM_GREEN => '2',
GIMP_HISTOGRAM_BLUE => '3',
GIMP_HISTOGRAM_ALPHA => '4' }
},
GimpLayerModeEffects =>
{ contig => 1,
header => 'base/base-enums.h',
@ -162,17 +174,6 @@ package Gimp::CodeGen::enums;
GIMP_ABSOLUTE_CONVOL => '1',
GIMP_NEGATIVE_CONVOL => '2' }
},
GimpChannelLutType =>
{ contig => 1,
header => 'base/base-enums.h',
symbols => [ qw(GIMP_VALUE_LUT GIMP_RED_LUT GIMP_GREEN_LUT
GIMP_BLUE_LUT GIMP_ALPHA_LUT) ],
mapping => { GIMP_VALUE_LUT => '0',
GIMP_RED_LUT => '1',
GIMP_GREEN_LUT => '2',
GIMP_BLUE_LUT => '3',
GIMP_ALPHA_LUT => '4' }
},
GimpHueRange =>
{ contig => 1,
header => 'base/base-enums.h',

View File

@ -25,7 +25,7 @@ sub drawable_arg () {{
sub channel_arg () {{
name => 'channel',
type => 'enum GimpChannelLutType',
type => 'enum GimpHistogramChannel',
desc => 'The channel to modify: { %%desc%% }'
}}
@ -125,9 +125,10 @@ HELP
code => <<'CODE'
{
if (gimp_drawable_is_indexed (drawable) ||
(! gimp_drawable_has_alpha (drawable) && channel == GIMP_ALPHA_LUT) ||
(! gimp_drawable_has_alpha (drawable) &&
channel == GIMP_HISTOGRAM_ALPHA) ||
(gimp_drawable_is_gray (drawable) &&
channel != GIMP_GRAY_LUT && channel != GIMP_ALPHA_LUT))
channel != GIMP_HISTOGRAM_VALUE && channel != GIMP_HISTOGRAM_ALPHA))
success = FALSE;
if (success)
@ -415,9 +416,10 @@ HELP
code => <<'CODE'
{
if (gimp_drawable_is_indexed (drawable) || (num_points & 1) ||
(! gimp_drawable_has_alpha (drawable) && channel == GIMP_ALPHA_LUT) ||
(! gimp_drawable_has_alpha (drawable) &&
channel == GIMP_HISTOGRAM_ALPHA) ||
(gimp_drawable_is_gray (drawable) &&
channel != GIMP_GRAY_LUT && channel != GIMP_ALPHA_LUT))
channel != GIMP_HISTOGRAM_VALUE && channel != GIMP_HISTOGRAM_ALPHA))
success = FALSE;
if (success)
@ -495,9 +497,10 @@ HELP
code => <<'CODE'
{
if (gimp_drawable_is_indexed (drawable) || (num_bytes != 256) ||
(! gimp_drawable_has_alpha (drawable) && channel == GIMP_ALPHA_LUT) ||
(! gimp_drawable_has_alpha (drawable) &&
channel == GIMP_HISTOGRAM_ALPHA) ||
(gimp_drawable_is_gray (drawable) &&
channel != GIMP_GRAY_LUT && channel != GIMP_ALPHA_LUT))
channel != GIMP_HISTOGRAM_VALUE && channel != GIMP_HISTOGRAM_ALPHA))
success = FALSE;
if (success)
@ -670,9 +673,10 @@ HELP
code => <<'CODE'
{
if (gimp_drawable_is_indexed (drawable) ||
(! gimp_drawable_has_alpha (drawable) && channel == GIMP_ALPHA_LUT) ||
(! gimp_drawable_has_alpha (drawable) &&
channel == GIMP_HISTOGRAM_ALPHA) ||
(gimp_drawable_is_gray (drawable) &&
channel != GIMP_GRAY_LUT && channel != GIMP_ALPHA_LUT))
channel != GIMP_HISTOGRAM_VALUE && channel != GIMP_HISTOGRAM_ALPHA))
success = FALSE;
if (success)