see plug-ins/perl/Changes

This commit is contained in:
Marc Lehmann
2000-08-24 22:53:53 +00:00
parent bb6640b3d6
commit adcb223e6a
36 changed files with 627 additions and 595 deletions

View File

@ -7,6 +7,7 @@ Revision history for Gimp-Perl extension.
- dropped a few prefixes (PROC_ from RUN_INTERACTIVE etc.. where - dropped a few prefixes (PROC_ from RUN_INTERACTIVE etc.. where
the new names would have a GIMP_ prefix). the new names would have a GIMP_ prefix).
- updated to new commandline options. - updated to new commandline options.
- updated enums.pl (And therefore, enumerations).
1.201 Thu Aug 24 23:44:43 CEST 2000 1.201 Thu Aug 24 23:44:43 CEST 2000
** LAST VERSION THAT WORKS WITH 1.0 ** ** LAST VERSION THAT WORKS WITH 1.0 **

View File

@ -10,7 +10,7 @@ use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD %EXPORT_TAGS @EXPORT_FAIL
use subs qw(init end lock unlock canonicalize_color); use subs qw(init end lock unlock canonicalize_color);
BEGIN { BEGIN {
$VERSION = 1.2; $VERSION = 1.201;
eval { eval {
require XSLoader; require XSLoader;
XSLoader::load Gimp $VERSION; XSLoader::load Gimp $VERSION;
@ -22,40 +22,41 @@ BEGIN {
} }
my @_param = qw( my @_param = qw(
PARAM_BOUNDARY PARAM_CHANNEL PARAM_COLOR PARAM_DISPLAY PARAM_DRAWABLE PDB_BOUNDARY PDB_CHANNEL PDB_COLOR PDB_DISPLAY PDB_DRAWABLE
PARAM_END PARAM_FLOAT PARAM_IMAGE PARAM_INT32 PARAM_FLOATARRAY w
PARAM_INT16 PARAM_PARASITE PARAM_STRING PARAM_PATH PARAM_INT16ARRAY PDB_END PDB_FLOAT PDB_IMAGE PDB_INT32 PDB_FLOATARRAY
PARAM_INT8 PARAM_INT8ARRAY PARAM_LAYER PARAM_REGION PARAM_STRINGARRAY PDB_INT16 PDB_PARASITE PDB_STRING PDB_PATH PDB_INT16ARRAY
PARAM_SELECTION PARAM_STATUS PARAM_INT32ARRAY PDB_INT8 PDB_INT8ARRAY PDB_LAYER PDB_REGION PDB_STRINGARRAY
PDB_SELECTION PDB_STATUS PDB_INT32ARRAY
); );
# constants that, in some earlier version, were autoloaded # constants that, in some earlier version, were autoloaded
my @_consts = (@_param, my @_consts = (@_param,
#ENUM_NAME# #ENUM_NAME#
'NORMAL_CONVOL', 'NEGATIVE_CONVOL', 'ABSOLUTE_CONVOL', 'VALUE_MODE', 'COLOR_MODE', 'SCREEN_MODE', 'MULTIPLY_MODE', 'PRESSURE', 'SOFT', 'HARD', 'RGBA_IMAGE', 'INDEXED_IMAGE', 'GRAYA_IMAGE', 'RGB_IMAGE',
'HUE_MODE', 'OVERLAY_MODE', 'SUBTRACT_MODE', 'NORMAL_MODE', 'DISSOLVE_MODE', 'SATURATION_MODE', 'BEHIND_MODE', 'INDEXEDA_IMAGE', 'GRAY_IMAGE', 'CUSTOM', 'FG_BG_HSV', 'FG_TRANS', 'FG_BG_RGB', 'BLUE_CHANNEL',
'DIFFERENCE_MODE', 'ADDITION_MODE', 'LIGHTEN_ONLY_MODE', 'DIVIDE_MODE', 'DARKEN_ONLY_MODE', 'SHADOWS', 'HIGHLIGHTS', 'GREEN_CHANNEL', 'GRAY_CHANNEL', 'AUXILLARY_CHANNEL', 'INDEXED_CHANNEL', 'RED_CHANNEL', 'CONTINUOUS', 'INCREMENTAL',
'MIDTONES', 'FG_BUCKET_FILL', 'PATTERN_BUCKET_FILL', 'BG_BUCKET_FILL', 'FG_TRANS', 'FG_BG_HSV', 'FG_BG_RGB', 'APPLY', 'DISCARD', 'UNKNOWN', 'VERTICAL', 'HORIZONTAL', 'DODGEBURN_HIGHLIGHTS','DODGEBURN_SHADOWS',
'CUSTOM', 'LINEAR_INTERPOLATION','CUBIC_INTERPOLATION', 'NEAREST_NEIGHBOR_INTERPOLATION','INDEXED', 'GRAY', 'RGB', 'DODGEBURN_MIDTONES', 'CUBIC_INTERPOLATION', 'LINEAR_INTERPOLATION','NEAREST_NEIGHBOR_INTERPOLATION','ALPHA_LUT', 'GREEN_LUT', 'BLUE_LUT',
'ONCE_END_COLOR', 'ONCE_FORWARD', 'LOOP_SAWTOOTH', 'ONCE_BACKWARDS', 'LOOP_TRIANGLE', 'FLATTEN_IMAGE', 'CLIP_TO_BOTTOM_LAYER', 'VALUE_LUT', 'RED_LUT', 'OFFSET_BACKGROUND', 'OFFSET_TRANSPARENT', 'BG_BUCKET_FILL', 'FG_BUCKET_FILL', 'PATTERN_BUCKET_FILL',
'CLIP_TO_IMAGE', 'EXPAND_AS_NECESSARY', 'CUSTOM_PALETTE', 'REUSE_PALETTE', 'WEB_PALETTE', 'MAKE_PALETTE', 'MONO_PALETTE', 'FSLOWBLEED_DITHER', 'NODESTRUCT_DITHER', 'FS_DITHER', 'NO_DITHER', 'FIXED_DITHER', 'PDB_CANCEL', 'PDB_SUCCESS',
'IMAGE_CLONE', 'PATTERN_CLONE', 'PDB_CALLING_ERROR', 'PDB_EXECUTION_ERROR', 'PDB_PASS_THROUGH', 'PDB_SUCCESS', 'RUN_WITH_LAST_VALS', 'PDB_CALLING_ERROR', 'PDB_EXECUTION_ERROR', 'PDB_PASS_THROUGH', 'WHITE_IMAGE_FILL', 'FG_IMAGE_FILL', 'TRANS_IMAGE_FILL', 'BG_IMAGE_FILL',
'RUN_INTERACTIVE', 'RUN_NONINTERACTIVE', 'DODGE', 'BURN', 'POINTS', 'PIXELS', 'DODGEBURN_SHADOWS', 'NO_IMAGE_FILL', 'LOOP_SAWTOOTH', 'ONCE_BACKWARDS', 'ONCE_FORWARD', 'ONCE_END_COLOR', 'LOOP_TRIANGLE', 'MONO_PALETTE',
'DODGEBURN_MIDTONES', 'DODGEBURN_HIGHLIGHTS','OFFSET_TRANSPARENT', 'OFFSET_BACKGROUND', 'FS_DITHER', 'NODESTRUCT_DITHER', 'NO_DITHER', 'WEB_PALETTE', 'MAKE_PALETTE', 'REUSE_PALETTE', 'CUSTOM_PALETTE', 'BURN', 'DODGE', 'CYAN_HUES',
'FSLOWBLEED_DITHER', 'FIXED_DITHER', 'CONSOLE', 'ERROR_CONSOLE', 'MESSAGE_BOX', 'REPEAT_NONE', 'REPEAT_TRIANGULAR', 'RED_HUES', 'GREEN_HUES', 'YELLOW_HUES', 'ALL_HUES', 'MAGENTA_HUES', 'BLUE_HUES', 'POINTS',
'REPEAT_SAWTOOTH', 'INTERSECT', 'ADD', 'SUB', 'REPLACE', 'TEMPORARY', 'EXTENSION', 'PIXELS', 'DIVIDE_MODE', 'SUBTRACT_MODE', 'SATURATION_MODE', 'ADDITION_MODE', 'SCREEN_MODE', 'BEHIND_MODE',
'INTERNAL', 'PLUGIN', 'BLUR_CONVOLVE', 'SHARPEN_CONVOLVE', 'CUSTOM_CONVOLVE', 'UNKNOWN', 'VERTICAL', 'MULTIPLY_MODE', 'DARKEN_ONLY_MODE', 'DIFFERENCE_MODE', 'DISSOLVE_MODE', 'VALUE_MODE', 'LIGHTEN_ONLY_MODE', 'COLOR_MODE',
'HORIZONTAL', 'YELLOW_HUES', 'MAGENTA_HUES', 'BLUE_HUES', 'GREEN_HUES', 'ALL_HUES', 'CYAN_HUES', 'NORMAL_MODE', 'HUE_MODE', 'OVERLAY_MODE', 'NEGATIVE_CONVOL', 'NORMAL_CONVOL', 'ABSOLUTE_CONVOL', 'BLUR_CONVOLVE',
'RED_HUES', 'SQUARE', 'CONICAL_SYMMETRIC', 'CONICAL_ASYMMETRIC', 'BILINEAR', 'SPIRAL_ANTICLOCKWISE','SHAPEBURST_ANGULAR', 'CUSTOM_CONVOLVE', 'SHARPEN_CONVOLVE', 'REPLACE', 'SUB', 'ADD', 'INTERSECT', 'SHADOWS',
'LINEAR', 'SHAPEBURST_SPHERICAL','RADIAL', 'SPIRAL_CLOCKWISE', 'SHAPEBURST_DIMPLED', 'VALUE_LUT', 'ALPHA_LUT', 'MIDTONES', 'HIGHLIGHTS', 'IMAGE_CLONE', 'PATTERN_CLONE', 'INDEXED', 'RGB', 'GRAY',
'BLUE_LUT', 'GREEN_LUT', 'RED_LUT', 'INDEXED_IMAGE', 'INDEXEDA_IMAGE', 'GRAY_IMAGE', 'RGB_IMAGE', 'BLACK_MASK', 'WHITE_MASK', 'ALPHA_MASK', 'BILINEAR', 'SPIRAL_CLOCKWISE', 'SQUARE', 'RADIAL',
'GRAYA_IMAGE', 'RGBA_IMAGE', 'INCREMENTAL', 'CONTINUOUS', 'TRANS_IMAGE_FILL', 'FG_IMAGE_FILL', 'NO_IMAGE_FILL', 'CONICAL_SYMMETRIC', 'SHAPEBURST_DIMPLED', 'CONICAL_ASYMMETRIC', 'LINEAR', 'SPIRAL_ANTICLOCKWISE','SHAPEBURST_ANGULAR', 'SHAPEBURST_SPHERICAL',
'BG_IMAGE_FILL', 'WHITE_IMAGE_FILL', 'BLACK_MASK', 'ALPHA_MASK', 'WHITE_MASK', 'DISCARD', 'APPLY', 'PLUGIN', 'EXTENSION', 'TEMPORARY', 'INTERNAL', 'MESSAGE_BOX', 'ERROR_CONSOLE', 'CONSOLE',
'BLUE_CHANNEL', 'INDEXED_CHANNEL', 'GREEN_CHANNEL', 'AUXILLARY_CHANNEL', 'GRAY_CHANNEL', 'RED_CHANNEL', 'PRESSURE', 'STACK_TRACE_ALWAYS', 'STACK_TRACE_QUERY', 'STACK_TRACE_NEVER', 'EXPAND_AS_NECESSARY', 'CLIP_TO_BOTTOM_LAYER','CLIP_TO_IMAGE', 'FLATTEN_IMAGE',
'SOFT', 'HARD', 'RUN_INTERACTIVE', 'RUN_WITH_LAST_VALS', 'RUN_NONINTERACTIVE', 'REPEAT_NONE', 'REPEAT_SAWTOOTH', 'REPEAT_TRIANGULAR',
#ENUM_NAME# #ENUM_NAME#
'STATUS_CALLING_ERROR', 'STATUS_EXECUTION_ERROR', 'STATUS_PASS_THROUGH', 'PDB_CALLING_ERROR', 'PDB_EXECUTION_ERROR', 'PDB_PASS_THROUGH',
'STATUS_SUCCESS', 'PARASITE_PERSISTENT', 'PARASITE_ATTACH_PARENT', 'PDB_SUCCESS', 'PARASITE_PERSISTENT', 'PARASITE_ATTACH_PARENT',
'PARASITE_PARENT_PERSISTENT', 'PARASITE_ATTACH_GRANDPARENT', 'PARASITE_GRANDPARENT_PERSISTENT', 'PARASITE_PARENT_PERSISTENT', 'PARASITE_ATTACH_GRANDPARENT', 'PARASITE_GRANDPARENT_PERSISTENT',
'PARASITE_UNDOABLE', 'PARASITE_PARENT_UNDOABLE', 'PARASITE_GRANDPARENT_UNDOABLE', 'PARASITE_UNDOABLE', 'PARASITE_PARENT_UNDOABLE', 'PARASITE_GRANDPARENT_UNDOABLE',
'TRACE_NONE', 'TRACE_CALL', 'TRACE_TYPE', 'TRACE_NAME', 'TRACE_DESC', 'TRACE_ALL', 'TRACE_NONE', 'TRACE_CALL', 'TRACE_TYPE', 'TRACE_NAME', 'TRACE_DESC', 'TRACE_ALL',
@ -63,11 +64,10 @@ my @_consts = (@_param,
'WRAP', 'SMEAR', 'BLACK', 'WRAP', 'SMEAR', 'BLACK',
'ADD_BLACK_MASK', 'ADD_WHITE_MASK', 'ADD_ALPHA_MASK', 'ADD_BLACK_MASK', 'ADD_WHITE_MASK', 'ADD_ALPHA_MASK',
'ORIENTATION_HORIZONTAL', 'ORIENTATION_VERTICAL', 'ORIENTATION_UNKNOWN',
'CAN_HANDLE_RGB', 'CAN_HANDLE_GRAY', 'CAN_HANDLE_INDEXED', 'EXPORT_CAN_HANDLE_RGB', 'EXPORT_CAN_HANDLE_GRAY', 'EXPORT_CAN_HANDLE_INDEXED',
'CAN_HANDLE_ALPHA', 'CAN_HANDLE_LAYERS', 'CAN_HANDLE_LAYERS_AS_ANIMATION', 'EXPORT_CAN_HANDLE_ALPHA ', 'EXPORT_CAN_HANDLE_LAYERS', 'EXPORT_CAN_HANDLE_LAYERS_AS_ANIMATION',
'NEEDS_ALPHA', 'EXPORT_NEEDS_ALPHA',
'EXPORT_CANCEL', 'EXPORT_IGNORE', 'EXPORT_EXPORT', 'EXPORT_CANCEL', 'EXPORT_IGNORE', 'EXPORT_EXPORT',
); );
@ -75,40 +75,37 @@ sub ADD_WHITE_MASK () { &WHITE_MASK }
sub ADD_BLACK_MASK () { &BLACK_MASK } sub ADD_BLACK_MASK () { &BLACK_MASK }
sub ADD_ALPHA_MASK () { &ALPHA_MASK } sub ADD_ALPHA_MASK () { &ALPHA_MASK }
sub ORIENTATION_HORIZONTAL () { &HORIZONTAL }
sub ORIENTATION_VERTICAL () { &VERTICAL }
sub ORIENTATION_UNKNOWN () { &UNKNOWN }
#ENUM_DEFS# #ENUM_DEFS#
sub NORMAL_CONVOL (){ 0} sub NEGATIVE_CONVOL (){ 2} sub ABSOLUTE_CONVOL (){ 1} sub VALUE_MODE (){14} sub COLOR_MODE (){13} sub PRESSURE (){ 2} sub SOFT (){ 1} sub HARD (){ 0} sub RGBA_IMAGE (){ 1} sub INDEXED_IMAGE (){ 4}
sub SCREEN_MODE (){ 4} sub MULTIPLY_MODE (){ 3} sub HUE_MODE (){11} sub OVERLAY_MODE (){ 5} sub SUBTRACT_MODE (){ 8} sub GRAYA_IMAGE (){ 3} sub RGB_IMAGE (){ 0} sub INDEXEDA_IMAGE (){ 5} sub GRAY_IMAGE (){ 2} sub CUSTOM (){ 3}
sub NORMAL_MODE (){ 0} sub DISSOLVE_MODE (){ 1} sub SATURATION_MODE (){12} sub BEHIND_MODE (){ 2} sub DIFFERENCE_MODE (){ 6} sub FG_BG_HSV (){ 1} sub FG_TRANS (){ 2} sub FG_BG_RGB (){ 0} sub BLUE_CHANNEL (){ 2} sub GREEN_CHANNEL (){ 1}
sub ADDITION_MODE (){ 7} sub LIGHTEN_ONLY_MODE (){10} sub DIVIDE_MODE (){15} sub DARKEN_ONLY_MODE (){ 9} sub SHADOWS (){ 0} sub GRAY_CHANNEL (){ 3} sub AUXILLARY_CHANNEL (){ 5} sub INDEXED_CHANNEL (){ 4} sub RED_CHANNEL (){ 0} sub CONTINUOUS (){ 0}
sub HIGHLIGHTS (){ 2} sub MIDTONES (){ 1} sub FG_BUCKET_FILL (){ 0} sub PATTERN_BUCKET_FILL (){ 2} sub BG_BUCKET_FILL (){ 1} sub INCREMENTAL (){ 1} sub APPLY (){ 0} sub DISCARD (){ 1} sub UNKNOWN (){ 2} sub VERTICAL (){ 1}
sub FG_TRANS (){ 2} sub FG_BG_HSV (){ 1} sub FG_BG_RGB (){ 0} sub CUSTOM (){ 3} sub LINEAR_INTERPOLATION(){ 0} sub HORIZONTAL (){ 0} sub DODGEBURN_HIGHLIGHTS(){ 0} sub DODGEBURN_SHADOWS (){ 2} sub DODGEBURN_MIDTONES (){ 1} sub CUBIC_INTERPOLATION (){ 1}
sub CUBIC_INTERPOLATION (){ 1} sub NEAREST_NEIGHBOR_INTERPOLATION(){ 2} sub INDEXED (){ 2} sub GRAY (){ 1} sub RGB (){ 0} sub LINEAR_INTERPOLATION(){ 0} sub NEAREST_NEIGHBOR_INTERPOLATION(){ 2} sub ALPHA_LUT (){ 4} sub GREEN_LUT (){ 2} sub BLUE_LUT (){ 3}
sub ONCE_END_COLOR (){ 4} sub ONCE_FORWARD (){ 0} sub LOOP_SAWTOOTH (){ 2} sub ONCE_BACKWARDS (){ 1} sub LOOP_TRIANGLE (){ 3} sub VALUE_LUT (){ 0} sub RED_LUT (){ 1} sub OFFSET_BACKGROUND (){ 0} sub OFFSET_TRANSPARENT (){ 1} sub BG_BUCKET_FILL (){ 1}
sub FLATTEN_IMAGE (){ 3} sub CLIP_TO_BOTTOM_LAYER(){ 2} sub CLIP_TO_IMAGE (){ 1} sub EXPAND_AS_NECESSARY (){ 0} sub CUSTOM_PALETTE (){ 4} sub FG_BUCKET_FILL (){ 0} sub PATTERN_BUCKET_FILL (){ 2} sub FSLOWBLEED_DITHER (){ 2} sub NODESTRUCT_DITHER (){ 4} sub FS_DITHER (){ 1}
sub REUSE_PALETTE (){ 1} sub WEB_PALETTE (){ 2} sub MAKE_PALETTE (){ 0} sub MONO_PALETTE (){ 3} sub IMAGE_CLONE (){ 0} sub NO_DITHER (){ 0} sub FIXED_DITHER (){ 3} sub PDB_CANCEL (){ 4} sub PDB_SUCCESS (){ 3} sub PDB_CALLING_ERROR (){ 1}
sub PATTERN_CLONE (){ 1} sub PDB_CALLING_ERROR (){ 1} sub PDB_EXECUTION_ERROR (){ 0} sub PDB_PASS_THROUGH (){ 2} sub PDB_SUCCESS (){ 3} sub PDB_EXECUTION_ERROR (){ 0} sub PDB_PASS_THROUGH (){ 2} sub WHITE_IMAGE_FILL (){ 2} sub FG_IMAGE_FILL (){ 0} sub TRANS_IMAGE_FILL (){ 3}
sub RUN_WITH_LAST_VALS (){bless \(my $x=2),'Gimp::run_mode'} sub RUN_INTERACTIVE (){bless \(my $x=0),'Gimp::run_mode'} sub RUN_NONINTERACTIVE (){bless \(my $x=1),'Gimp::run_mode'} sub DODGE (){ 0} sub BURN (){ 1} sub BG_IMAGE_FILL (){ 1} sub NO_IMAGE_FILL (){ 4} sub LOOP_SAWTOOTH (){ 2} sub ONCE_BACKWARDS (){ 1} sub ONCE_FORWARD (){ 0}
sub POINTS (){ 1} sub PIXELS (){ 0} sub DODGEBURN_SHADOWS (){ 2} sub DODGEBURN_MIDTONES (){ 1} sub DODGEBURN_HIGHLIGHTS(){ 0} sub ONCE_END_COLOR (){ 4} sub LOOP_TRIANGLE (){ 3} sub MONO_PALETTE (){ 3} sub WEB_PALETTE (){ 2} sub MAKE_PALETTE (){ 0}
sub OFFSET_TRANSPARENT (){ 1} sub OFFSET_BACKGROUND (){ 0} sub FS_DITHER (){ 1} sub NODESTRUCT_DITHER (){ 4} sub NO_DITHER (){ 0} sub REUSE_PALETTE (){ 1} sub CUSTOM_PALETTE (){ 4} sub BURN (){ 1} sub DODGE (){ 0} sub CYAN_HUES (){ 4}
sub FSLOWBLEED_DITHER (){ 2} sub FIXED_DITHER (){ 3} sub CONSOLE (){ 1} sub ERROR_CONSOLE (){ 2} sub MESSAGE_BOX (){ 0} sub RED_HUES (){ 1} sub GREEN_HUES (){ 3} sub YELLOW_HUES (){ 2} sub ALL_HUES (){ 0} sub MAGENTA_HUES (){ 6}
sub REPEAT_NONE (){ 0} sub REPEAT_TRIANGULAR (){ 2} sub REPEAT_SAWTOOTH (){ 1} sub INTERSECT (){ 3} sub ADD (){ 0} sub BLUE_HUES (){ 5} sub POINTS (){ 1} sub PIXELS (){ 0} sub DIVIDE_MODE (){15} sub SUBTRACT_MODE (){ 8}
sub SUB (){ 1} sub REPLACE (){ 2} sub TEMPORARY (){ 3} sub EXTENSION (){ 2} sub INTERNAL (){ 0} sub SATURATION_MODE (){12} sub ADDITION_MODE (){ 7} sub SCREEN_MODE (){ 4} sub BEHIND_MODE (){ 2} sub MULTIPLY_MODE (){ 3}
sub PLUGIN (){ 1} sub BLUR_CONVOLVE (){ 0} sub SHARPEN_CONVOLVE (){ 1} sub CUSTOM_CONVOLVE (){ 2} sub UNKNOWN (){ 2} sub DARKEN_ONLY_MODE (){ 9} sub DIFFERENCE_MODE (){ 6} sub DISSOLVE_MODE (){ 1} sub VALUE_MODE (){14} sub LIGHTEN_ONLY_MODE (){10}
sub VERTICAL (){ 1} sub HORIZONTAL (){ 0} sub YELLOW_HUES (){ 2} sub MAGENTA_HUES (){ 6} sub BLUE_HUES (){ 5} sub COLOR_MODE (){13} sub NORMAL_MODE (){ 0} sub HUE_MODE (){11} sub OVERLAY_MODE (){ 5} sub NEGATIVE_CONVOL (){ 2}
sub GREEN_HUES (){ 3} sub ALL_HUES (){ 0} sub CYAN_HUES (){ 4} sub RED_HUES (){ 1} sub SQUARE (){ 3} sub NORMAL_CONVOL (){ 0} sub ABSOLUTE_CONVOL (){ 1} sub BLUR_CONVOLVE (){ 0} sub CUSTOM_CONVOLVE (){ 2} sub SHARPEN_CONVOLVE (){ 1}
sub CONICAL_SYMMETRIC (){ 4} sub CONICAL_ASYMMETRIC (){ 5} sub BILINEAR (){ 1} sub SPIRAL_ANTICLOCKWISE(){10} sub SHAPEBURST_ANGULAR (){ 6} sub REPLACE (){ 2} sub SUB (){ 1} sub ADD (){ 0} sub INTERSECT (){ 3} sub SHADOWS (){ 0}
sub LINEAR (){ 0} sub SHAPEBURST_SPHERICAL(){ 7} sub RADIAL (){ 2} sub SPIRAL_CLOCKWISE (){ 9} sub SHAPEBURST_DIMPLED (){ 8} sub MIDTONES (){ 1} sub HIGHLIGHTS (){ 2} sub IMAGE_CLONE (){ 0} sub PATTERN_CLONE (){ 1} sub INDEXED (){ 2}
sub VALUE_LUT (){ 0} sub ALPHA_LUT (){ 4} sub BLUE_LUT (){ 3} sub GREEN_LUT (){ 2} sub RED_LUT (){ 1} sub RGB (){ 0} sub GRAY (){ 1} sub BLACK_MASK (){ 1} sub WHITE_MASK (){ 0} sub ALPHA_MASK (){ 2}
sub INDEXED_IMAGE (){ 4} sub INDEXEDA_IMAGE (){ 5} sub GRAY_IMAGE (){ 2} sub RGB_IMAGE (){ 0} sub GRAYA_IMAGE (){ 3} sub BILINEAR (){ 1} sub SPIRAL_CLOCKWISE (){ 9} sub SQUARE (){ 3} sub RADIAL (){ 2} sub CONICAL_SYMMETRIC (){ 4}
sub RGBA_IMAGE (){ 1} sub INCREMENTAL (){ 1} sub CONTINUOUS (){ 0} sub TRANS_IMAGE_FILL (){ 3} sub FG_IMAGE_FILL (){ 0} sub SHAPEBURST_DIMPLED (){ 8} sub CONICAL_ASYMMETRIC (){ 5} sub LINEAR (){ 0} sub SPIRAL_ANTICLOCKWISE(){10} sub SHAPEBURST_ANGULAR (){ 6}
sub NO_IMAGE_FILL (){ 4} sub BG_IMAGE_FILL (){ 1} sub WHITE_IMAGE_FILL (){ 2} sub BLACK_MASK (){ 1} sub ALPHA_MASK (){ 2} sub SHAPEBURST_SPHERICAL(){ 7} sub PLUGIN (){ 1} sub EXTENSION (){ 2} sub TEMPORARY (){ 3} sub INTERNAL (){ 0}
sub WHITE_MASK (){ 0} sub DISCARD (){ 1} sub APPLY (){ 0} sub BLUE_CHANNEL (){ 2} sub INDEXED_CHANNEL (){ 4} sub MESSAGE_BOX (){ 0} sub ERROR_CONSOLE (){ 2} sub CONSOLE (){ 1} sub STACK_TRACE_ALWAYS (){ 2} sub STACK_TRACE_QUERY (){ 1}
sub GREEN_CHANNEL (){ 1} sub AUXILLARY_CHANNEL (){ 5} sub GRAY_CHANNEL (){ 3} sub RED_CHANNEL (){ 0} sub PRESSURE (){ 2} sub STACK_TRACE_NEVER (){ 0} sub EXPAND_AS_NECESSARY (){ 0} sub CLIP_TO_BOTTOM_LAYER(){ 2} sub CLIP_TO_IMAGE (){ 1} sub FLATTEN_IMAGE (){ 3}
sub SOFT (){ 1} sub HARD (){ 0} sub RUN_INTERACTIVE (){bless \(my $x=0),'Gimp::run_mode'} sub RUN_WITH_LAST_VALS (){bless \(my $x=2),'Gimp::run_mode'} sub RUN_NONINTERACTIVE (){bless \(my $x=1),'Gimp::run_mode'} sub REPEAT_NONE (){ 0} sub REPEAT_SAWTOOTH (){ 1}
sub REPEAT_TRIANGULAR (){ 2}
#ENUM_DEFS# #ENUM_DEFS#
sub WRAP (){ 0 } sub WRAP (){ 0 }
@ -567,10 +564,10 @@ _pseudoclass qw(Gradients gimp_gradients_);
_pseudoclass qw(Edit gimp_edit_); _pseudoclass qw(Edit gimp_edit_);
_pseudoclass qw(Progress gimp_progress_); _pseudoclass qw(Progress gimp_progress_);
_pseudoclass qw(Region ); _pseudoclass qw(Region );
_pseudoclass qw(Parasite ); _pseudoclass qw(GimpParasite );
# "C"-Classes # "C"-Classes
_pseudoclass qw(GDrawable gimp_gdrawable_ gimp_drawable_); _pseudoclass qw(GimpDrawable gimp_drawable_);
_pseudoclass qw(PixelRgn gimp_pixel_rgn_); _pseudoclass qw(PixelRgn gimp_pixel_rgn_);
_pseudoclass qw(Tile gimp_tile_); _pseudoclass qw(Tile gimp_tile_);
@ -594,7 +591,7 @@ sub new($$$$$$$$) {
init Gimp::PixelRgn(@_); init Gimp::PixelRgn(@_);
} }
package Gimp::Parasite; package Gimp::GimpParasite;
sub is_type($$) { $_[0]->[0] eq $_[1] } sub is_type($$) { $_[0]->[0] eq $_[1] }
sub is_persistent($) { $_[0]->[1] & &Gimp::PARASITE_PERSISTENT } sub is_persistent($) { $_[0]->[1] & &Gimp::PARASITE_PERSISTENT }
@ -668,11 +665,11 @@ This will overwrite your AUTOLOAD function, if you have one!
=item :param =item :param
Import PARAM_* constants (PARAM_INT32, PARAM_STRING etc.) only. Import PARAM_* constants (PDB_INT32, PDB_STRING etc.) only.
=item :consts =item :consts
All constants from gimpenums.h (BG_IMAGE_FILL, RUN_NONINTERACTIVE, NORMAL_MODE, PARAM_INT32 etc.). All constants from gimpenums.h (BG_IMAGE_FILL, RUN_NONINTERACTIVE, NORMAL_MODE, PDB_INT32 etc.).
=item spawn_options=I<options> =item spawn_options=I<options>
@ -979,7 +976,7 @@ at runtime.
These functions return what you would expect: an array of images, layers or These functions return what you would expect: an array of images, layers or
channels. The reason why this is documented is that the usual way to return channels. The reason why this is documented is that the usual way to return
C<PARAM_INT32ARRAY>'s would be to return a B<reference> to an B<array of C<PDB_INT32ARRAY>'s would be to return a B<reference> to an B<array of
integers>, rather than blessed objects. integers>, rather than blessed objects.
=item gimp_drawable_bounds drawable/gdrawable =item gimp_drawable_bounds drawable/gdrawable

View File

@ -97,52 +97,43 @@ BOOT:
{ {
HV *stash = gv_stashpvn("Gimp", 4, TRUE); HV *stash = gv_stashpvn("Gimp", 4, TRUE);
newCONSTSUB(stash,"PARAM_BOUNDARY",newSViv(PARAM_BOUNDARY)); newCONSTSUB(stash,"PDB_BOUNDARY",newSViv(GIMP_PDB_BOUNDARY));
newCONSTSUB(stash,"PARAM_CHANNEL",newSViv(PARAM_CHANNEL)); newCONSTSUB(stash,"PDB_CHANNEL",newSViv(GIMP_PDB_CHANNEL));
newCONSTSUB(stash,"PARAM_COLOR",newSViv(PARAM_COLOR)); newCONSTSUB(stash,"PDB_COLOR",newSViv(GIMP_PDB_COLOR));
newCONSTSUB(stash,"PARAM_DISPLAY",newSViv(PARAM_DISPLAY)); newCONSTSUB(stash,"PDB_DISPLAY",newSViv(GIMP_PDB_DISPLAY));
newCONSTSUB(stash,"PARAM_DRAWABLE",newSViv(PARAM_DRAWABLE)); newCONSTSUB(stash,"PDB_DRAWABLE",newSViv(GIMP_PDB_DRAWABLE));
newCONSTSUB(stash,"PARAM_END",newSViv(PARAM_END)); newCONSTSUB(stash,"PDB_END",newSViv(GIMP_PDB_END));
newCONSTSUB(stash,"PARAM_FLOAT",newSViv(PARAM_FLOAT)); newCONSTSUB(stash,"PDB_FLOAT",newSViv(GIMP_PDB_FLOAT));
newCONSTSUB(stash,"PARAM_FLOATARRAY",newSViv(PARAM_FLOATARRAY)); newCONSTSUB(stash,"PDB_FLOATARRAY",newSViv(GIMP_PDB_FLOATARRAY));
newCONSTSUB(stash,"PARAM_IMAGE",newSViv(PARAM_IMAGE)); newCONSTSUB(stash,"PDB_IMAGE",newSViv(GIMP_PDB_IMAGE));
newCONSTSUB(stash,"PARAM_INT16",newSViv(PARAM_INT16)); newCONSTSUB(stash,"PDB_INT16",newSViv(GIMP_PDB_INT16));
newCONSTSUB(stash,"PARAM_INT16ARRAY",newSViv(PARAM_INT16ARRAY)); newCONSTSUB(stash,"PDB_INT16ARRAY",newSViv(GIMP_PDB_INT16ARRAY));
newCONSTSUB(stash,"PARAM_INT32",newSViv(PARAM_INT32)); newCONSTSUB(stash,"PDB_INT32",newSViv(GIMP_PDB_INT32));
newCONSTSUB(stash,"PARAM_INT32ARRAY",newSViv(PARAM_INT32ARRAY)); newCONSTSUB(stash,"PDB_INT32ARRAY",newSViv(GIMP_PDB_INT32ARRAY));
newCONSTSUB(stash,"PARAM_INT8",newSViv(PARAM_INT8)); newCONSTSUB(stash,"PDB_INT8",newSViv(GIMP_PDB_INT8));
newCONSTSUB(stash,"PARAM_INT8ARRAY",newSViv(PARAM_INT8ARRAY)); newCONSTSUB(stash,"PDB_INT8ARRAY",newSViv(GIMP_PDB_INT8ARRAY));
newCONSTSUB(stash,"PARAM_LAYER",newSViv(PARAM_LAYER)); newCONSTSUB(stash,"PDB_LAYER",newSViv(GIMP_PDB_LAYER));
newCONSTSUB(stash,"PARAM_PATH",newSViv(PARAM_PATH)); newCONSTSUB(stash,"PDB_PATH",newSViv(GIMP_PDB_PATH));
newCONSTSUB(stash,"PARAM_REGION",newSViv(PARAM_REGION)); newCONSTSUB(stash,"PDB_REGION",newSViv(GIMP_PDB_REGION));
newCONSTSUB(stash,"PARAM_SELECTION",newSViv(PARAM_SELECTION)); newCONSTSUB(stash,"PDB_SELECTION",newSViv(GIMP_PDB_SELECTION));
newCONSTSUB(stash,"PARAM_STATUS",newSViv(PARAM_STATUS)); newCONSTSUB(stash,"PDB_STATUS",newSViv(GIMP_PDB_STATUS));
newCONSTSUB(stash,"PARAM_STRING",newSViv(PARAM_STRING)); newCONSTSUB(stash,"PDB_STRING",newSViv(GIMP_PDB_STRING));
newCONSTSUB(stash,"PARAM_STRINGARRAY",newSViv(PARAM_STRINGARRAY)); newCONSTSUB(stash,"PDB_STRINGARRAY",newSViv(GIMP_PDB_STRINGARRAY));
#if GIMP_PARASITE #if GIMP_PARASITE
newCONSTSUB(stash,"PARAM_PARASITE",newSViv(PARAM_PARASITE)); newCONSTSUB(stash,"PDB_PARASITE",newSViv(GIMP_PDB_PARASITE));
newCONSTSUB(stash,"PARASITE_PERSISTENT",newSViv(PARASITE_PERSISTENT)); newCONSTSUB(stash,"PARASITE_PERSISTENT",newSViv(GIMP_PARASITE_PERSISTENT));
newCONSTSUB(stash,"PARASITE_UNDOABLE",newSViv(PARASITE_UNDOABLE)); newCONSTSUB(stash,"PARASITE_UNDOABLE",newSViv(GIMP_PARASITE_UNDOABLE));
newCONSTSUB(stash,"PARASITE_ATTACH_PARENT",newSViv(PARASITE_ATTACH_PARENT)); newCONSTSUB(stash,"PARASITE_ATTACH_PARENT",newSViv(GIMP_PARASITE_ATTACH_PARENT));
newCONSTSUB(stash,"PARASITE_PARENT_PERSISTENT",newSViv(PARASITE_PARENT_PERSISTENT)); newCONSTSUB(stash,"PARASITE_PARENT_PERSISTENT",newSViv(GIMP_PARASITE_PARENT_PERSISTENT));
newCONSTSUB(stash,"PARASITE_PARENT_UNDOABLE",newSViv(PARASITE_PARENT_UNDOABLE)); newCONSTSUB(stash,"PARASITE_PARENT_UNDOABLE",newSViv(GIMP_PARASITE_PARENT_UNDOABLE));
newCONSTSUB(stash,"PARASITE_ATTACH_GRANDPARENT",newSViv(PARASITE_ATTACH_GRANDPARENT)); newCONSTSUB(stash,"PARASITE_ATTACH_GRANDPARENT",newSViv(GIMP_PARASITE_ATTACH_GRANDPARENT));
newCONSTSUB(stash,"PARASITE_GRANDPARENT_PERSISTENT",newSViv(PARASITE_GRANDPARENT_PERSISTENT)); newCONSTSUB(stash,"PARASITE_GRANDPARENT_PERSISTENT",newSViv(GIMP_PARASITE_GRANDPARENT_PERSISTENT));
newCONSTSUB(stash,"PARASITE_GRANDPARENT_UNDOABLE",newSViv(PARASITE_GRANDPARENT_UNDOABLE)); newCONSTSUB(stash,"PARASITE_GRANDPARENT_UNDOABLE",newSViv(GIMP_PARASITE_GRANDPARENT_UNDOABLE));
#endif #endif
newCONSTSUB(stash,"PROC_EXTENSION",newSViv(PROC_EXTENSION));
newCONSTSUB(stash,"PROC_PLUG_IN",newSViv(PROC_PLUG_IN));
newCONSTSUB(stash,"PROC_TEMPORARY",newSViv(PROC_TEMPORARY));
newCONSTSUB(stash,"STATUS_CALLING_ERROR",newSViv(STATUS_CALLING_ERROR));
newCONSTSUB(stash,"STATUS_EXECUTION_ERROR",newSViv(STATUS_EXECUTION_ERROR));
newCONSTSUB(stash,"STATUS_PASS_THROUGH",newSViv(STATUS_PASS_THROUGH));
newCONSTSUB(stash,"STATUS_SUCCESS",newSViv(STATUS_SUCCESS));
newCONSTSUB(stash,"TRACE_NONE",newSViv(TRACE_NONE)); newCONSTSUB(stash,"TRACE_NONE",newSViv(TRACE_NONE));
newCONSTSUB(stash,"TRACE_CALL",newSViv(TRACE_CALL)); newCONSTSUB(stash,"TRACE_CALL",newSViv(TRACE_CALL));
newCONSTSUB(stash,"TRACE_TYPE",newSViv(TRACE_TYPE)); newCONSTSUB(stash,"TRACE_TYPE",newSViv(TRACE_TYPE));
@ -151,20 +142,20 @@ BOOT:
newCONSTSUB(stash,"TRACE_ALL" ,newSViv(TRACE_ALL )); newCONSTSUB(stash,"TRACE_ALL" ,newSViv(TRACE_ALL ));
/**/ /**/
#if HAVE_DIVIDE_MODE || IN_GIMP #if HAVE_DIVIDE_MODE || IN_GIMP
/*newCONSTSUB(stash,"DIVIDE_MODE",newSViv(DIVIDE_MODE));*/ /*newCONSTSUB(stash,"GIMP_DIVIDE_MODE",newSViv(GIMP_DIVIDE_MODE));*/
#endif #endif
#ifdef GIMP_HAVE_EXPORT #ifdef GIMP_HAVE_EXPORT
newCONSTSUB(stash,"CAN_HANDLE_RGB", newSViv(CAN_HANDLE_RGB)); newCONSTSUB(stash,"EXPORT_CAN_HANDLE_RGB", newSViv(GIMP_EXPORT_CAN_HANDLE_RGB));
newCONSTSUB(stash,"CAN_HANDLE_GRAY", newSViv(CAN_HANDLE_GRAY)); newCONSTSUB(stash,"EXPORT_CAN_HANDLE_GRAY", newSViv(GIMP_EXPORT_CAN_HANDLE_GRAY));
newCONSTSUB(stash,"CAN_HANDLE_INDEXED", newSViv(CAN_HANDLE_INDEXED)); newCONSTSUB(stash,"EXPORT_CAN_HANDLE_INDEXED", newSViv(GIMP_EXPORT_CAN_HANDLE_INDEXED));
newCONSTSUB(stash,"CAN_HANDLE_ALPHA", newSViv(CAN_HANDLE_ALPHA)); newCONSTSUB(stash,"EXPORT_CAN_HANDLE_ALPHA ", newSViv(GIMP_EXPORT_CAN_HANDLE_ALPHA ));
newCONSTSUB(stash,"CAN_HANDLE_LAYERS", newSViv(CAN_HANDLE_LAYERS)); newCONSTSUB(stash,"EXPORT_CAN_HANDLE_LAYERS", newSViv(GIMP_EXPORT_CAN_HANDLE_LAYERS));
newCONSTSUB(stash,"CAN_HANDLE_LAYERS_AS_ANIMATION", newSViv(CAN_HANDLE_LAYERS_AS_ANIMATION)); newCONSTSUB(stash,"EXPORT_CAN_HANDLE_LAYERS_AS_ANIMATION", newSViv(GIMP_EXPORT_CAN_HANDLE_LAYERS_AS_ANIMATION));
newCONSTSUB(stash,"NEEDS_ALPHA", newSViv(NEEDS_ALPHA)); newCONSTSUB(stash,"EXPORT_NEEDS_ALPHA", newSViv(GIMP_EXPORT_NEEDS_ALPHA));
newCONSTSUB(stash,"EXPORT_CANCEL", newSViv(EXPORT_CANCEL)); newCONSTSUB(stash,"EXPORT_CANCEL", newSViv(GIMP_EXPORT_CANCEL));
newCONSTSUB(stash,"EXPORT_IGNORE", newSViv(EXPORT_CANCEL)); newCONSTSUB(stash,"EXPORT_IGNORE", newSViv(GIMP_EXPORT_CANCEL));
newCONSTSUB(stash,"EXPORT_EXPORT", newSViv(EXPORT_EXPORT)); newCONSTSUB(stash,"EXPORT_EXPORT", newSViv(GIMP_EXPORT_EXPORT));
#endif #endif
} }

View File

@ -43,7 +43,7 @@ Gimp-Perl extension (contact him to include new functions) is Marc Lehmann
package Gimp::Compat; package Gimp::Compat;
$VERSION=1.2; $VERSION=1.201;
use Gimp ('croak', '__'); use Gimp ('croak', '__');

View File

@ -49,30 +49,30 @@ starting point for your experiments)
=cut =cut
sub PF_INT8 () { Gimp::PARAM_INT8 }; sub PF_INT8 () { Gimp::PDB_INT8 };
sub PF_INT16 () { Gimp::PARAM_INT16 }; sub PF_INT16 () { Gimp::PDB_INT16 };
sub PF_INT32 () { Gimp::PARAM_INT32 }; sub PF_INT32 () { Gimp::PDB_INT32 };
sub PF_FLOAT () { Gimp::PARAM_FLOAT }; sub PF_FLOAT () { Gimp::PDB_FLOAT };
sub PF_STRING () { Gimp::PARAM_STRING }; sub PF_STRING () { Gimp::PDB_STRING };
sub PF_COLOR () { Gimp::PARAM_COLOR }; sub PF_COLOR () { Gimp::PDB_COLOR };
sub PF_COLOUR () { Gimp::PARAM_COLOR }; sub PF_COLOUR () { Gimp::PDB_COLOR };
sub PF_IMAGE () { Gimp::PARAM_IMAGE }; sub PF_IMAGE () { Gimp::PDB_IMAGE };
sub PF_LAYER () { Gimp::PARAM_LAYER }; sub PF_LAYER () { Gimp::PDB_LAYER };
sub PF_CHANNEL () { Gimp::PARAM_CHANNEL}; sub PF_CHANNEL () { Gimp::PDB_CHANNEL };
sub PF_DRAWABLE () { Gimp::PARAM_DRAWABLE}; sub PF_DRAWABLE () { Gimp::PDB_DRAWABLE };
sub PF_TOGGLE () { Gimp::PARAM_END+1 }; sub PF_TOGGLE () { Gimp::PDB_END+1 };
sub PF_SLIDER () { Gimp::PARAM_END+2 }; sub PF_SLIDER () { Gimp::PDB_END+2 };
sub PF_FONT () { Gimp::PARAM_END+3 }; sub PF_FONT () { Gimp::PDB_END+3 };
sub PF_SPINNER () { Gimp::PARAM_END+4 }; sub PF_SPINNER () { Gimp::PDB_END+4 };
sub PF_ADJUSTMENT(){ Gimp::PARAM_END+5 }; # compatibility fix for script-fu _ONLY_ sub PF_ADJUSTMENT(){ Gimp::PDB_END+5 }; # compatibility fix for script-fu _ONLY_
sub PF_BRUSH () { Gimp::PARAM_END+6 }; sub PF_BRUSH () { Gimp::PDB_END+6 };
sub PF_PATTERN () { Gimp::PARAM_END+7 }; sub PF_PATTERN () { Gimp::PDB_END+7 };
sub PF_GRADIENT () { Gimp::PARAM_END+8 }; sub PF_GRADIENT () { Gimp::PDB_END+8 };
sub PF_RADIO () { Gimp::PARAM_END+9 }; sub PF_RADIO () { Gimp::PDB_END+9 };
sub PF_CUSTOM () { Gimp::PARAM_END+10 }; sub PF_CUSTOM () { Gimp::PDB_END+10 };
sub PF_FILE () { Gimp::PARAM_END+11 }; sub PF_FILE () { Gimp::PDB_END+11 };
sub PF_TEXT () { Gimp::PARAM_END+12 }; sub PF_TEXT () { Gimp::PDB_END+12 };
sub PF_BOOL () { PF_TOGGLE }; sub PF_BOOL () { PF_TOGGLE };
sub PF_INT () { PF_INT32 }; sub PF_INT () { PF_INT32 };
@ -133,17 +133,17 @@ sub carp {
} }
# Some Standard Arguments # Some Standard Arguments
my @image_params = ([&Gimp::PARAM_IMAGE , "image", "The image to work on"], my @image_params = ([&Gimp::PDB_IMAGE , "image", "The image to work on"],
[&Gimp::PARAM_DRAWABLE , "drawable", "The drawable to work on"]); [&Gimp::PDB_DRAWABLE , "drawable", "The drawable to work on"]);
my @load_params = ([&Gimp::PARAM_STRING , "filename", "The name of the file"], my @load_params = ([&Gimp::PDB_STRING , "filename", "The name of the file"],
[&Gimp::PARAM_STRING , "raw_filename","The name of the file"]); [&Gimp::PDB_STRING , "raw_filename","The name of the file"]);
my @save_params = (@image_params, @load_params); my @save_params = (@image_params, @load_params);
my @load_retvals = ([&Gimp::PARAM_IMAGE , "image", "Output image"]); my @load_retvals = ([&Gimp::PDB_IMAGE , "image", "Output image"]);
my $image_retval = [&Gimp::PARAM_IMAGE , "image", "The resulting image"]; my $image_retval = [&Gimp::PDB_IMAGE , "image", "The resulting image"];
# expand all the pod directives in string (currently they are only removed) # expand all the pod directives in string (currently they are only removed)
sub expand_podsections() { sub expand_podsections() {
@ -319,7 +319,7 @@ Gimp::on_query {
for (@$results) { for (@$results) {
next if ref $_; next if ref $_;
if ($_ == &Gimp::PARAM_IMAGE) { if ($_ == &Gimp::PDB_IMAGE) {
$_ = $image_retval; $_ = $image_retval;
} }
} }
@ -331,24 +331,24 @@ Gimp::on_query {
# guess the datatype. yeah! # guess the datatype. yeah!
sub datatype(@) { sub datatype(@) {
for(@_) { for(@_) {
return Gimp::PARAM_STRING unless /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/; # perlfaq4 return Gimp::PDB_STRING unless /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/; # perlfaq4
return Gimp::PARAM_FLOAT unless /^[+-]?\d+$/; # again return Gimp::PDB_FLOAT unless /^[+-]?\d+$/; # again
} }
return Gimp::PARAM_INT32; return Gimp::PDB_INT32;
} }
sub odd_values(@) { sub odd_values(@) {
my %x = @_; values %x; my %x = @_; values %x;
} }
for(@$params) { for(@$params) {
$_->[0]=Gimp::PARAM_INT32 if $_->[0] == PF_TOGGLE; $_->[0]=Gimp::PDB_INT32 if $_->[0] == PF_TOGGLE;
$_->[0]=Gimp::PARAM_STRING if $_->[0] == PF_FONT; $_->[0]=Gimp::PDB_STRING if $_->[0] == PF_FONT;
$_->[0]=Gimp::PARAM_STRING if $_->[0] == PF_BRUSH; $_->[0]=Gimp::PDB_STRING if $_->[0] == PF_BRUSH;
$_->[0]=Gimp::PARAM_STRING if $_->[0] == PF_PATTERN; $_->[0]=Gimp::PDB_STRING if $_->[0] == PF_PATTERN;
$_->[0]=Gimp::PARAM_STRING if $_->[0] == PF_GRADIENT; $_->[0]=Gimp::PDB_STRING if $_->[0] == PF_GRADIENT;
$_->[0]=Gimp::PARAM_STRING if $_->[0] == PF_CUSTOM; $_->[0]=Gimp::PDB_STRING if $_->[0] == PF_CUSTOM;
$_->[0]=Gimp::PARAM_STRING if $_->[0] == PF_FILE; $_->[0]=Gimp::PDB_STRING if $_->[0] == PF_FILE;
$_->[0]=Gimp::PARAM_STRING if $_->[0] == PF_TEXT; $_->[0]=Gimp::PDB_STRING if $_->[0] == PF_TEXT;
$_->[0]=datatype(odd_values(@{$_->[4]})) if $_->[0] == PF_RADIO; $_->[0]=datatype(odd_values(@{$_->[4]})) if $_->[0] == PF_RADIO;
$_->[0]=datatype($_->[3],@{$_->[4]}) if $_->[0] == PF_SLIDER; $_->[0]=datatype($_->[3],@{$_->[4]}) if $_->[0] == PF_SLIDER;
$_->[0]=datatype($_->[3],@{$_->[4]}) if $_->[0] == PF_SPINNER; $_->[0]=datatype($_->[3],@{$_->[4]}) if $_->[0] == PF_SPINNER;
@ -363,7 +363,7 @@ Gimp::on_query {
Gimp->gimp_install_procedure($function,$blurb,$help,$author,$copyright,$date, Gimp->gimp_install_procedure($function,$blurb,$help,$author,$copyright,$date,
$menupath,$imagetypes,$type, $menupath,$imagetypes,$type,
[[Gimp::PARAM_INT32,"run_mode","Interactive, [non-interactive]"], [[Gimp::PDB_INT32,"run_mode","Interactive, [non-interactive]"],
@$params], @$params],
$results); $results);
@ -627,23 +627,23 @@ sub register($$$$$$$$$;@) {
for($menupath) { for($menupath) {
if (/^<Image>\//) { if (/^<Image>\//) {
$type = &Gimp::PROC_PLUG_IN; $type = &Gimp::PLUGIN;
unshift @$params, @image_params; unshift @$params, @image_params;
$defargs = @image_params; $defargs = @image_params;
} elsif (/^<Load>\//) { } elsif (/^<Load>\//) {
$type = &Gimp::PROC_PLUG_IN; $type = &Gimp::PLUGIN;
unshift @$params, @load_params; unshift @$params, @load_params;
unshift @$results, @load_retvals; unshift @$results, @load_retvals;
$defargs = @load_params; $defargs = @load_params;
} elsif (/^<Save>\//) { } elsif (/^<Save>\//) {
$type = &Gimp::PROC_PLUG_IN; $type = &Gimp::PLUGIN;
unshift @$params, @save_params; unshift @$params, @save_params;
$defargs = @save_params; $defargs = @save_params;
} elsif (/^<Toolbox>\//) { } elsif (/^<Toolbox>\//) {
$type = &Gimp::PROC_EXTENSION; $type = &Gimp::EXTENSION;
$defargs = 0; $defargs = 0;
} elsif (/^<None>/) { } elsif (/^<None>/) {
$type = &Gimp::PROC_EXTENSION; $type = &Gimp::EXTENSION;
$defargs = 0; $defargs = 0;
} else { } else {
die __"menupath _must_ start with <Image>, <Toolbox>, <Load>, <Save> or <None>!"; die __"menupath _must_ start with <Image>, <Toolbox>, <Load>, <Save> or <None>!";

View File

@ -4,7 +4,7 @@ use strict;
use vars qw($VERSION @ISA); use vars qw($VERSION @ISA);
BEGIN { BEGIN {
$VERSION = 1.2; $VERSION = 1.201;
eval { eval {
require XSLoader; require XSLoader;
XSLoader::load Gimp::Lib $VERSION; XSLoader::load Gimp::Lib $VERSION;
@ -43,15 +43,15 @@ sub import {}
# does not work. # does not work.
sub gimp_image_list { sub gimp_image_list {
map _autobless($_,&Gimp::PARAM_IMAGE),gimp_call_procedure "gimp_image_list"; map _autobless($_,&Gimp::GIMP_PDB_IMAGE),gimp_call_procedure "gimp_image_list";
} }
sub gimp_image_get_layers { sub gimp_image_get_layers {
map _autobless($_,&Gimp::PARAM_LAYER),gimp_call_procedure "gimp_image_get_layers",@_; map _autobless($_,&Gimp::GIMP_PDB_LAYER),gimp_call_procedure "gimp_image_get_layers",@_;
} }
sub gimp_image_get_channels { sub gimp_image_get_channels {
map _autobless($_,&Gimp::PARAM_CHANNEL),gimp_call_procedure "gimp_image_get_channels",@_; map _autobless($_,&Gimp::GIMP_PDB_CHANNEL),gimp_call_procedure "gimp_image_get_channels",@_;
} }
# "server-side" perl code evaluation # "server-side" perl code evaluation

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@ package Gimp::Module;
use base qw(DynaLoader); use base qw(DynaLoader);
require DynaLoader; require DynaLoader;
$VERSION=1.2; $VERSION=1.201;
bootstrap Gimp::Module; bootstrap Gimp::Module;

View File

@ -11,7 +11,7 @@ plug-in. If you bug me enough I'll rewrite this document.
use Gimp; use Gimp;
use PDL; # to make sensible things with the pixels use PDL; # to make sensible things with the pixels
# Gimp::GDrawable - The GDrawable structure # Gimp::GimpDrawable - The GimpDrawable structure
# Gimp::Tile - The Tile family of functions. # Gimp::Tile - The Tile family of functions.
# Gimp::PixelRgn - The PixelRgn family of functions. # Gimp::PixelRgn - The PixelRgn family of functions.
@ -19,7 +19,7 @@ plug-in. If you bug me enough I'll rewrite this document.
You can access the pixels in a drawable through tiles or pixel You can access the pixels in a drawable through tiles or pixel
regions. This manpage explains how this is done in perl. All classes regions. This manpage explains how this is done in perl. All classes
(Gimp::GDrawable, C<Gimp::Tile>, C<Gimp::PixelRgn>) are available with and (Gimp::GimpDrawable, C<Gimp::Tile>, C<Gimp::PixelRgn>) are available with and
without the C<Gimp::> prefix. without the C<Gimp::> prefix.
=head1 GDRAWABLES =head1 GDRAWABLES
@ -28,8 +28,8 @@ Well, you know drawables? (also known as PARAM_DRAWABLE or Gimp::Drawable)?
In the Gimp, drawables are things you can draw on: layers, channels or whole In the Gimp, drawables are things you can draw on: layers, channels or whole
images. While most functions named C<gimp_drawable_something> operate on images. While most functions named C<gimp_drawable_something> operate on
C<drawable_ID>s, some functions (notably the ones operating on raw pixel C<drawable_ID>s, some functions (notably the ones operating on raw pixel
data!) need a C<GDrawable> instead. Every drawable has a corresponding data!) need a C<GimpDrawable> instead. Every drawable has a corresponding
C<GDrawable>, you can get it with the C<gimp_drawable_get> function: C<GimpDrawable>, you can get it with the C<gimp_drawable_get> function:
my $gdrawable = $drawable->get; my $gdrawable = $drawable->get;
@ -45,7 +45,7 @@ always the same (it's hardcoded in your Gimp program).
The C<gimp_tile_width> and C<gimp_tile_height> functions return the current The C<gimp_tile_width> and C<gimp_tile_height> functions return the current
width/height of a tile (at the moment, this is 64x64). width/height of a tile (at the moment, this is 64x64).
How do I get a tile? First, you have to grab a GDrawable structure. You can How do I get a tile? First, you have to grab a GimpDrawable structure. You can
get one from any drawable, by calling the C<get> function: get one from any drawable, by calling the C<get> function:
my $gdrawable = $drawable->get; my $gdrawable = $drawable->get;
@ -74,13 +74,13 @@ pixels, rows, columns and rectangles within these regions. Don't expect me
to explain everything now, I don't understand the mechanism too well to explain everything now, I don't understand the mechanism too well
myself.. myself..
How do I create a pixel region? First, you have to grab a GDrawable structure. You can How do I create a pixel region? First, you have to grab a GimpDrawable structure. You can
get one from any drawable, by calling the C<get> function: get one from any drawable, by calling the C<get> function:
my $gdrawable = $drawable->get; my $gdrawable = $drawable->get;
Now you can create as many PixelRgn structures as you want from Now you can create as many PixelRgn structures as you want from
the C<GDrawable>: the C<GimpDrawable>:
my $region = new PixelRgn($gdrawable,0,0,50,30,1,0); # with "new" my $region = new PixelRgn($gdrawable,0,0,50,30,1,0); # with "new"
my $region = $gdrawable->pixel_rgn(0,0,50,30,1,0); # or from a drawable my $region = $gdrawable->pixel_rgn(0,0,50,30,1,0); # or from a drawable

View File

@ -1,6 +1,6 @@
package Gimp::Pod; package Gimp::Pod;
$VERSION=1.2; $VERSION=1.201;
sub myqx(&) { sub myqx(&) {
local $/; local $/;

View File

@ -51,7 +51,7 @@ require Exporter;
use Gimp; use Gimp;
$VERSION=1.2; $VERSION=1.201;
############################################################################## ##############################################################################
=pod =pod

View File

@ -27,7 +27,7 @@ BOOT:
{ {
HV *stash = gv_stashpvn("Gimp::Module", 12, TRUE); HV *stash = gv_stashpvn("Gimp::Module", 12, TRUE);
newCONSTSUB(stash,"GIMP_MODULE_OK",newSViv(GIMP_MODULE_OK)); newCONSTSUB(stash,"MODULE_OK",newSViv(GIMP_MODULE_OK));
newCONSTSUB(stash,"GIMP_MODULE_UNLOAD",newSViv(GIMP_MODULE_UNLOAD)); newCONSTSUB(stash,"MODULE_UNLOAD",newSViv(GIMP_MODULE_UNLOAD));
} }

View File

@ -20,7 +20,7 @@ use Fcntl qw(F_SETFD);
require DynaLoader; require DynaLoader;
$VERSION = 1.2; $VERSION = 1.201;
bootstrap Gimp::Net $VERSION; bootstrap Gimp::Net $VERSION;
@ -171,8 +171,15 @@ sub start_server {
(&Gimp::_PS_FLAG_BATCH | &Gimp::_PS_FLAG_QUIET)." ". (&Gimp::_PS_FLAG_BATCH | &Gimp::_PS_FLAG_QUIET)." ".
fileno($gimp_fh); fileno($gimp_fh);
push(@args,"--no-data") if $opt=~s/(^|:)no-?data//; push(@args,"--no-data") if $opt=~s/(^|:)no-?data//;
push(@args,"-n") unless $opt=~s/(^|:)gui//; push(@args,"-i") unless $opt=~s/(^|:)gui//;
push(@args,"--verbose") if $Gimp::verbose; push(@args,"--verbose") if $Gimp::verbose;
print STDERR $Gimp::Config{GIMP},
"--no-splash",
@args,
"-b",
"(extension-perl-server $args)",
"(gimp_quit 0)",
"(gimp-quit 0)";
{ # block to suppress warning with broken perls (e.g. 5.004) { # block to suppress warning with broken perls (e.g. 5.004)
exec $Gimp::Config{GIMP}, exec $Gimp::Config{GIMP},
"--no-splash", "--no-splash",

View File

@ -311,32 +311,32 @@ Gimp::on_query {
Gimp->install_procedure("extension_perl_server", "Start the Gimp-Perl Server", Gimp->install_procedure("extension_perl_server", "Start the Gimp-Perl Server",
"This is the server for plug-ins written using the Gimp::Net module", "This is the server for plug-ins written using the Gimp::Net module",
"Marc Lehmann <pcg\@goof.com>", "Marc Lehmann", "1999-12-02", "Marc Lehmann <pcg\@goof.com>", "Marc Lehmann", "1999-12-02",
N_"<Toolbox>/Xtns/Perl/Server", undef, &Gimp::PROC_EXTENSION, N_"<Toolbox>/Xtns/Perl/Server", undef, &Gimp::EXTENSION,
[ [
[&Gimp::PARAM_INT32, "run_mode", "Interactive, [non-interactive]"], [&Gimp::PDB_INT32, "run_mode", "Interactive, [non-interactive]"],
[&Gimp::PARAM_INT32, "flags", "internal flags (must be 0)"], [&Gimp::PDB_INT32, "flags", "internal flags (must be 0)"],
[&Gimp::PARAM_INT32, "extra", "multi-purpose ;)"], [&Gimp::PDB_INT32, "extra", "multi-purpose ;)"],
],[]); ],[]);
Gimp->install_procedure("gimp_procedural_db_constant_register", "Register a plug-in specific integer constant", Gimp->install_procedure("gimp_procedural_db_constant_register", "Register a plug-in specific integer constant",
"Plug-ins should register their custom constants using this function, so". "Plug-ins should register their custom constants using this function, so".
"other plug-ins (notably script-languages) can access these using symbolic names", "other plug-ins (notably script-languages) can access these using symbolic names",
"Marc Lehmann <pcg\@goof.com>", "Marc Lehmann", "1999-07-07", "Marc Lehmann <pcg\@goof.com>", "Marc Lehmann", "1999-07-07",
undef, undef, &Gimp::PROC_EXTENSION, undef, undef, &Gimp::EXTENSION,
[ [
[&Gimp::PARAM_STRING, "procedure", "The name of the function that uses this constant"], [&Gimp::PDB_STRING, "procedure", "The name of the function that uses this constant"],
[&Gimp::PARAM_STRING, "arg_num", "The name of the argument that this constant is used for"], [&Gimp::PDB_STRING, "arg_num", "The name of the argument that this constant is used for"],
[&Gimp::PARAM_STRING, "constant_name", "The name of the constant, should be all-uppercase"], [&Gimp::PDB_STRING, "constant_name", "The name of the constant, should be all-uppercase"],
[&Gimp::PARAM_INT32, "constant_value", "The (integer) value for this constant"], [&Gimp::PDB_INT32, "constant_value", "The (integer) value for this constant"],
],[]); ],[]);
Gimp->install_procedure("gimp_procedural_db_set_default", "Set the default value for a plug-in argument", Gimp->install_procedure("gimp_procedural_db_set_default", "Set the default value for a plug-in argument",
"Plug-ins should register default values for their arguments", "Plug-ins should register default values for their arguments",
"Marc Lehmann <pcg\@goof.com>", "Marc Lehmann", "1999-07-07", "Marc Lehmann <pcg\@goof.com>", "Marc Lehmann", "1999-07-07",
undef, undef, &Gimp::PROC_EXTENSION, undef, undef, &Gimp::EXTENSION,
[ [
[&Gimp::PARAM_STRING, "procedure", "The name of the function that uses this constant"], [&Gimp::PDB_STRING, "procedure", "The name of the function that uses this constant"],
[&Gimp::PARAM_STRING, "arg_num", "The name of the argument that this constant is used for"], [&Gimp::PDB_STRING, "arg_num", "The name of the argument that this constant is used for"],
[&Gimp::PARAM_INT32, "default_value", "The default value for this constant"], [&Gimp::PDB_INT32, "default_value", "The default value for this constant"],
],[]); ],[]);
}; };

View File

@ -5,7 +5,7 @@ use Gimp::Fu;
use base 'DynaLoader'; use base 'DynaLoader';
BEGIN { BEGIN {
$VERSION = 1.2; $VERSION = 1.201;
eval { eval {
require XSLoader; require XSLoader;
XSLoader::load Gimp::UI $VERSION; XSLoader::load Gimp::UI $VERSION;

View File

@ -21,7 +21,7 @@
/* libgimo requires a rather broken interface. this must be here because.. /* libgimo requires a rather broken interface. this must be here because..
* well, nobody knows why... ARGH! */ * well, nobody knows why... ARGH! */
GPlugInInfo PLUG_IN_INFO = { 0, 0, 0, 0 }; GimpPlugInInfo PLUG_IN_INFO = { 0, 0, 0, 0 };
#if 0 #if 0
static void gimp_pattern_select_widget_callback (gchar *name, gint width, static void gimp_pattern_select_widget_callback (gchar *name, gint width,

View File

@ -3,7 +3,7 @@ package Gimp::basewidget; # pragma
use Gtk; use Gtk;
use Gimp; use Gimp;
$VERSION = 1.2; $VERSION = 1.201;
=head1 NAME =head1 NAME

View File

@ -60,6 +60,9 @@ AC_ARG_ENABLE(gimptest, [ --disable-gimptest Do not try to compile and ru
GIMP_LIBS_NOUI=`$GIMPTOOL $gimptool_args --libs-noui` GIMP_LIBS_NOUI=`$GIMPTOOL $gimptool_args --libs-noui`
fi fi
GIMP_DATA_DIR=`$GIMPTOOL $gimptool_args --gimpdatadir`
GIMP_PLUGIN_DIR=`$GIMPTOOL $gimptool_args --gimpplugindir`
gimptool_major_version=`$GIMPTOOL $gimptool_args --version | \ gimptool_major_version=`$GIMPTOOL $gimptool_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
gimptool_minor_version=`$GIMPTOOL $gimptool_args --version | \ gimptool_minor_version=`$GIMPTOOL $gimptool_args --version | \
@ -79,9 +82,15 @@ dnl
AC_TRY_RUN([ AC_TRY_RUN([
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <libgimp/gimp.h> #include <libgimp/gimp.h>
GPlugInInfo PLUG_IN_INFO = #if GIMP_CHECK_VERSION(1,1,20)
GimpPlugInInfo
#else
GPlugInInfo
#endif
PLUG_IN_INFO =
{ {
NULL, /* init_proc */ NULL, /* init_proc */
NULL, /* quit_proc */ NULL, /* quit_proc */
@ -146,6 +155,14 @@ int main ()
AC_TRY_LINK([ AC_TRY_LINK([
#include <stdio.h> #include <stdio.h>
#include <libgimp/gimp.h> #include <libgimp/gimp.h>
GPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
NULL, /* query_proc */
NULL /* run_proc */
};
], [ return 0; ], ], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means" [ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GIMP or finding the wrong" echo "*** that the run-time linker is not finding GIMP or finding the wrong"
@ -174,6 +191,8 @@ int main ()
AC_SUBST(GIMP_LIBS) AC_SUBST(GIMP_LIBS)
AC_SUBST(GIMP_CFLAGS_NOUI) AC_SUBST(GIMP_CFLAGS_NOUI)
AC_SUBST(GIMP_LIBS_NOUI) AC_SUBST(GIMP_LIBS_NOUI)
AC_SUBST(GIMP_DATA_DIR)
AC_SUBST(GIMP_PLUGIN_DIR)
rm -f conf.gimptest rm -f conf.gimptest
]) ])

View File

@ -38,7 +38,6 @@ $^W=0;
_EXTENSIVE_TESTS => q[@EXTENSIVE_TESTS@], _EXTENSIVE_TESTS => q[@EXTENSIVE_TESTS@],
IN_GIMP => q[@IN_GIMP@], IN_GIMP => q[@IN_GIMP@],
COMPAT_CRUFT => q[@PERL_COMPAT_CRUFT@],
pdl_inc => '', pdl_inc => '',
pdl_typemaps => '', pdl_typemaps => '',

View File

@ -720,6 +720,9 @@ echo "configure:707: checking for GIMP - version >= $min_gimp_version" >&5
GIMP_LIBS_NOUI=`$GIMPTOOL $gimptool_args --libs-noui` GIMP_LIBS_NOUI=`$GIMPTOOL $gimptool_args --libs-noui`
fi fi
GIMP_DATA_DIR=`$GIMPTOOL $gimptool_args --gimpdatadir`
GIMP_PLUGIN_DIR=`$GIMPTOOL $gimptool_args --gimpplugindir`
gimptool_major_version=`$GIMPTOOL $gimptool_args --version | \ gimptool_major_version=`$GIMPTOOL $gimptool_args --version | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
gimptool_minor_version=`$GIMPTOOL $gimptool_args --version | \ gimptool_minor_version=`$GIMPTOOL $gimptool_args --version | \
@ -736,14 +739,20 @@ echo "configure:707: checking for GIMP - version >= $min_gimp_version" >&5
echo $ac_n "cross compiling; assumed OK... $ac_c" echo $ac_n "cross compiling; assumed OK... $ac_c"
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 740 "configure" #line 743 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <libgimp/gimp.h> #include <libgimp/gimp.h>
GPlugInInfo PLUG_IN_INFO = #if GIMP_CHECK_VERSION(1,1,20)
GimpPlugInInfo
#else
GPlugInInfo
#endif
PLUG_IN_INFO =
{ {
NULL, /* init_proc */ NULL, /* init_proc */
NULL, /* quit_proc */ NULL, /* quit_proc */
@ -785,7 +794,7 @@ int main ()
EOF EOF
if { (eval echo configure:789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
: :
else else
@ -819,17 +828,25 @@ fi
CFLAGS="$CFLAGS $GIMP_CFLAGS" CFLAGS="$CFLAGS $GIMP_CFLAGS"
LIBS="$LIBS $GIMP_LIBS" LIBS="$LIBS $GIMP_LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 823 "configure" #line 832 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h> #include <stdio.h>
#include <libgimp/gimp.h> #include <libgimp/gimp.h>
GPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
NULL, /* query_proc */
NULL /* run_proc */
};
int main() { int main() {
return 0; return 0;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
echo "*** The test program compiled, but did not run. This usually means" echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GIMP or finding the wrong" echo "*** that the run-time linker is not finding GIMP or finding the wrong"
@ -864,6 +881,8 @@ rm -f conftest*
rm -f conf.gimptest rm -f conf.gimptest
@ -935,7 +954,7 @@ fi
# Extract the first word of "glib-config", so it can be a program name with args. # Extract the first word of "glib-config", so it can be a program name with args.
set dummy glib-config; ac_word=$2 set dummy glib-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:939: checking for $ac_word" >&5 echo "configure:958: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -970,7 +989,7 @@ fi
min_glib_version=1.2.0 min_glib_version=1.2.0
echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6
echo "configure:974: checking for GLIB - version >= $min_glib_version" >&5 echo "configure:993: checking for GLIB - version >= $min_glib_version" >&5
no_glib="" no_glib=""
if test "$GLIB_CONFIG" = "no" ; then if test "$GLIB_CONFIG" = "no" ; then
no_glib=yes no_glib=yes
@ -993,7 +1012,7 @@ echo "configure:974: checking for GLIB - version >= $min_glib_version" >&5
echo $ac_n "cross compiling; assumed OK... $ac_c" echo $ac_n "cross compiling; assumed OK... $ac_c"
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 997 "configure" #line 1016 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <glib.h> #include <glib.h>
@ -1069,7 +1088,7 @@ main ()
} }
EOF EOF
if { (eval echo configure:1073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:1092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
: :
else else
@ -1103,7 +1122,7 @@ fi
CFLAGS="$CFLAGS $GLIB_CFLAGS" CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$LIBS $GLIB_LIBS" LIBS="$LIBS $GLIB_LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1107 "configure" #line 1126 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <glib.h> #include <glib.h>
@ -1113,7 +1132,7 @@ int main() {
return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); return ((glib_major_version) || (glib_minor_version) || (glib_micro_version));
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
echo "*** The test program compiled, but did not run. This usually means" echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GLIB or finding the wrong" echo "*** that the run-time linker is not finding GLIB or finding the wrong"
@ -1155,7 +1174,7 @@ rm -f conftest*
ac_gimp_save_CPPFLAGS="$CPPFLAGS" ac_gimp_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $GIMP_CFLAGS" CPPFLAGS="$CPPFLAGS $GIMP_CFLAGS"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1159: checking how to run the C preprocessor" >&5 echo "configure:1178: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory. # On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then if test -n "$CPP" && test -d "$CPP"; then
CPP= CPP=
@ -1170,13 +1189,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser, # On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. # not just through cpp.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1174 "configure" #line 1193 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@ -1187,13 +1206,13 @@ else
rm -rf conftest* rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp" CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1191 "configure" #line 1210 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@ -1204,13 +1223,13 @@ else
rm -rf conftest* rm -rf conftest*
CPP="${CC-cc} -nologo -E" CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1208 "configure" #line 1227 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@ -1235,7 +1254,7 @@ fi
echo "$ac_t""$CPP" 1>&6 echo "$ac_t""$CPP" 1>&6
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1239 "configure" #line 1258 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <libgimp/gimp.h> #include <libgimp/gimp.h>
EOF EOF
@ -1253,17 +1272,17 @@ for ac_hdr in libgimp/gimpmodule.h libintl.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1257: checking for $ac_hdr" >&5 echo "configure:1276: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1262 "configure" #line 1281 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
@ -1295,17 +1314,17 @@ for ac_hdr in unistd.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1299: checking for $ac_hdr" >&5 echo "configure:1318: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1304 "configure" #line 1323 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
@ -1337,12 +1356,12 @@ CONFIG_H="config.h"
for ac_func in vsnprintf for ac_func in vsnprintf
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1341: checking for $ac_func" >&5 echo "configure:1360: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1346 "configure" #line 1365 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
@ -1365,7 +1384,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
@ -1396,7 +1415,7 @@ done
echo $ac_n "checking for intelligent life""... $ac_c" 1>&6 echo $ac_n "checking for intelligent life""... $ac_c" 1>&6
echo "configure:1400: checking for intelligent life" >&5 echo "configure:1419: checking for intelligent life" >&5
echo "$ac_t""not found" 1>&6 echo "$ac_t""not found" 1>&6
@ -1420,12 +1439,12 @@ echo "$ac_t""not found" 1>&6
for ac_func in _exit for ac_func in _exit
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1424: checking for $ac_func" >&5 echo "configure:1443: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1429 "configure" #line 1448 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
@ -1448,7 +1467,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
@ -1619,6 +1638,8 @@ s%@GIMP_CFLAGS@%$GIMP_CFLAGS%g
s%@GIMP_LIBS@%$GIMP_LIBS%g s%@GIMP_LIBS@%$GIMP_LIBS%g
s%@GIMP_CFLAGS_NOUI@%$GIMP_CFLAGS_NOUI%g s%@GIMP_CFLAGS_NOUI@%$GIMP_CFLAGS_NOUI%g
s%@GIMP_LIBS_NOUI@%$GIMP_LIBS_NOUI%g s%@GIMP_LIBS_NOUI@%$GIMP_LIBS_NOUI%g
s%@GIMP_DATA_DIR@%$GIMP_DATA_DIR%g
s%@GIMP_PLUGIN_DIR@%$GIMP_PLUGIN_DIR%g
s%@GLIB_CONFIG@%$GLIB_CONFIG%g s%@GLIB_CONFIG@%$GLIB_CONFIG%g
s%@GLIB_CFLAGS@%$GLIB_CFLAGS%g s%@GLIB_CFLAGS@%$GLIB_CFLAGS%g
s%@GLIB_LIBS@%$GLIB_LIBS%g s%@GLIB_LIBS@%$GLIB_LIBS%g

View File

@ -21,7 +21,6 @@ AC_SUBST(LDFLAGS)
AC_SUBST(prefix) AC_SUBST(prefix)
AC_SUBST(IN_GIMP) AC_SUBST(IN_GIMP)
AC_SUBST(PERL_COMPAT_CRUFT)
AC_SUBST(GIMP_CFLAGS) AC_SUBST(GIMP_CFLAGS)
AC_SUBST(GIMP_CFLAGS_NOUI) AC_SUBST(GIMP_CFLAGS_NOUI)

View File

@ -47,8 +47,6 @@ if test $gimptool_major_version -lt 2 && test $gimptool_minor_version -lt 1 ; th
echo '** released 1.0.x versions of the gimp, many scripts will not, since they' echo '** released 1.0.x versions of the gimp, many scripts will not, since they'
echo '** already use the new API.' echo '** already use the new API.'
echo echo
else
PERL_COMPAT_CRUFT="-DGIMP_ENABLE_COMPAT_CRUFT"
fi fi

View File

@ -96,8 +96,8 @@ sub extension_create_images {
sub query { sub query {
gimp_install_procedure("extension_create_images", "a test extension in perl", gimp_install_procedure("extension_create_images", "a test extension in perl",
"try it out", "Marc Lehmann", "Marc Lehmann", "1997-02-06", "try it out", "Marc Lehmann", "Marc Lehmann", "1997-02-06",
N_"<Toolbox>/Xtns/Create_Images", undef, PROC_EXTENSION, N_"<Toolbox>/Xtns/Create_Images", undef, EXTENSION,
[[PARAM_INT32, "run_mode", "Interactive, [non-interactive]"]], []); [[PDB_INT32, "run_mode", "Interactive, [non-interactive]"]], []);
} }
sub net { sub net {

View File

@ -86,28 +86,28 @@ my $last_func;
my $last_arg; my $last_arg;
my %type2str = ( my %type2str = (
&PARAM_BOUNDARY => 'BOUNDARY', &PDB_BOUNDARY => 'BOUNDARY',
&PARAM_CHANNEL => 'CHANNEL', &PDB_CHANNEL => 'CHANNEL',
&PARAM_COLOR => 'COLOR', &PDB_COLOR => 'COLOR',
&PARAM_DISPLAY => 'DISPLAY', &PDB_DISPLAY => 'DISPLAY',
&PARAM_DRAWABLE => 'DRAWABLE', &PDB_DRAWABLE => 'DRAWABLE',
&PARAM_FLOAT => 'FLOAT', &PDB_FLOAT => 'FLOAT',
&PARAM_IMAGE => 'IMAGE', &PDB_IMAGE => 'IMAGE',
&PARAM_INT32 => 'INT32', &PDB_INT32 => 'INT32',
&PARAM_FLOATARRAY => 'FLOATARRAY', &PDB_FLOATARRAY => 'FLOATARRAY',
&PARAM_INT16 => 'INT16', &PDB_INT16 => 'INT16',
&PARAM_PARASITE => 'PARASITE', &PDB_PARASITE => 'PARASITE',
&PARAM_STRING => 'STRING', &PDB_STRING => 'STRING',
&PARAM_PATH => 'PATH', &PDB_PATH => 'PATH',
&PARAM_INT16ARRAY => 'INT16ARRAY', &PDB_INT16ARRAY => 'INT16ARRAY',
&PARAM_INT8 => 'INT8', &PDB_INT8 => 'INT8',
&PARAM_INT8ARRAY => 'INT8ARRAY', &PDB_INT8ARRAY => 'INT8ARRAY',
&PARAM_LAYER => 'LAYER', &PDB_LAYER => 'LAYER',
&PARAM_REGION => 'REGION', &PDB_REGION => 'REGION',
&PARAM_STRINGARRAY => 'STRINGARRAY', &PDB_STRINGARRAY => 'STRINGARRAY',
&PARAM_SELECTION => 'SELECTION', &PDB_SELECTION => 'SELECTION',
&PARAM_STATUS => 'STATUS', &PDB_STATUS => 'STATUS',
&PARAM_INT32ARRAY => 'INT32ARRAY', &PDB_INT32ARRAY => 'INT32ARRAY',
); );
sub setheight { sub setheight {
@ -207,15 +207,15 @@ sub complete_function {
sub complete_type { sub complete_type {
my($type,$name,$desc)=@_; my($type,$name,$desc)=@_;
if($type==PARAM_IMAGE) { if($type==PDB_IMAGE) {
set_clist(map(("$$_: ".$_->get_filename,$$_),Gimp->image_list)); set_clist(map(("$$_: ".$_->get_filename,$$_),Gimp->image_list));
} elsif($type==PARAM_LAYER) { } elsif($type==PDB_LAYER) {
set_clist(map { my $i = $_; map(("$$_: ".$i->get_filename."/".$_->get_name,$$_),$i->get_layers)} Gimp->image_list); set_clist(map { my $i = $_; map(("$$_: ".$i->get_filename."/".$_->get_name,$$_),$i->get_layers)} Gimp->image_list);
} elsif($type==PARAM_CHANNEL) { } elsif($type==PDB_CHANNEL) {
set_clist(map { my $i = $_; map(("$$_: ".$i->get_filename."/".$_->get_name,$$_),$i->get_channels)} Gimp->image_list); set_clist(map { my $i = $_; map(("$$_: ".$i->get_filename."/".$_->get_name,$$_),$i->get_channels)} Gimp->image_list);
} elsif($type==PARAM_DRAWABLE) { } elsif($type==PDB_DRAWABLE) {
set_clist(map { my $i = $_; map(("$$_: ".$i->get_filename."/".$_->get_name,$$_),($i->get_layers,$i->get_channels))} Gimp->image_list); set_clist(map { my $i = $_; map(("$$_: ".$i->get_filename."/".$_->get_name,$$_),($i->get_layers,$i->get_channels))} Gimp->image_list);
} elsif ($type==PARAM_INT32) { } elsif ($type==PDB_INT32) {
if ($name eq "run_mode") { if ($name eq "run_mode") {
set_clist("RUN_NONINTERACTIVE","RUN_NONINTERACTIVE", set_clist("RUN_NONINTERACTIVE","RUN_NONINTERACTIVE",
"RUN_INTERACTIVE","RUN_INTERACTIVE", "RUN_INTERACTIVE","RUN_INTERACTIVE",

View File

@ -44,7 +44,7 @@ register "file_avi_save",
my($img,$drawable,$filename,$raw_filename,$depth,$compression,$index) = @_; my($img,$drawable,$filename,$raw_filename,$depth,$compression,$index) = @_;
my($new_img,$new_drawable); my($new_img,$new_drawable);
my $export = Gimp::UI::export_image($new_img=$img, $new_drawable=$drawable, "AVI", my $export = Gimp::UI::export_image($new_img=$img, $new_drawable=$drawable, "AVI",
CAN_HANDLE_RGB|CAN_HANDLE_LAYERS_AS_ANIMATION|CAN_HANDLE_ALPHA); EXPORT_CAN_HANDLE_RGB|EXPORT_CAN_HANDLE_LAYERS_AS_ANIMATION|EXPORT_CAN_HANDLE_ALPHA );
die "export failed" if $export == EXPORT_CANCEL; die "export failed" if $export == EXPORT_CANCEL;
sysopen FILE,$filename,O_CREAT|O_TRUNC|O_WRONLY or die "Unable to open '$filename' for writing: $!\n"; sysopen FILE,$filename,O_CREAT|O_TRUNC|O_WRONLY or die "Unable to open '$filename' for writing: $!\n";
my $us_frame = eval { $img->parasite_find("gimp-interframe-delay")->data } || 100000; my $us_frame = eval { $img->parasite_find("gimp-interframe-delay")->data } || 100000;
@ -239,9 +239,9 @@ register "file_avi_load",
$image = new Image($width,$height,RGB); $image = new Image($width,$height,RGB);
$image->undo_disable; $image->undo_disable;
$image->set_filename($filename); $image->set_filename($filename);
$image->parasite_attach(new Parasite "gimp-interframe-delay", PARASITE_PERSISTENT, $us_frame); $image->parasite_attach(new GimpParasite "gimp-interframe-delay", PARASITE_PERSISTENT, $us_frame);
$image->parasite_attach(new Parasite "gimp-avi-depth", PARASITE_PERSISTENT, $depth == 16 ? 15 : $depth); $image->parasite_attach(new GimpParasite "gimp-avi-depth", PARASITE_PERSISTENT, $depth == 16 ? 15 : $depth);
$image->parasite_attach(new Parasite "gimp-avi-compression", PARASITE_PERSISTENT, $compression); $image->parasite_attach(new GimpParasite "gimp-avi-compression", PARASITE_PERSISTENT, $compression);
} }
}, },
"00db" => sub { "00db" => sub {

View File

@ -44,7 +44,7 @@ register "file_colorhtml_save",
my($new_img,$new_drawable); my($new_img,$new_drawable);
my $max; my $max;
my $export = Gimp::UI::export_image ($new_img=$img, $new_drawable=$drawable, "COLORHTML", my $export = Gimp::UI::export_image ($new_img=$img, $new_drawable=$drawable, "COLORHTML",
CAN_HANDLE_RGB); EXPORT_CAN_HANDLE_RGB);
die __"export failed" if $export == EXPORT_CANCEL; die __"export failed" if $export == EXPORT_CANCEL;
my ($w,$h) = ($new_drawable->width, $new_drawable->height); my ($w,$h) = ($new_drawable->width, $new_drawable->height);

View File

@ -38,9 +38,9 @@ register "file_dataurl_save",
my($new_img,$new_drawable); my($new_img,$new_drawable);
my $max; my $max;
my $export = Gimp::UI::export_image ($new_img=$img, $new_drawable=$drawable, "DATAURL", my $export = Gimp::UI::export_image ($new_img=$img, $new_drawable=$drawable, "DATAURL",
$type==0 ? CAN_HANDLE_INDEXED|CAN_HANDLE_ALPHA $type==0 ? EXPORT_CAN_HANDLE_INDEXED|EXPORT_CAN_HANDLE_ALPHA
: $type==1 ? CAN_HANDLE_RGB|CAN_HANDLE_GRAY : $type==1 ? EXPORT_CAN_HANDLE_RGB|EXPORT_CAN_HANDLE_GRAY
: $type==2 ? CAN_HANDLE_RGB|CAN_HANDLE_GRAY|CAN_HANDLE_INDEXED : $type==2 ? EXPORT_CAN_HANDLE_RGB|EXPORT_CAN_HANDLE_GRAY|EXPORT_CAN_HANDLE_INDEXED
: 0 ); : 0 );
die __"export failed" if $export == EXPORT_CANCEL; die __"export failed" if $export == EXPORT_CANCEL;

View File

@ -126,7 +126,7 @@ register "dust",
# [PF_INT32, 'seed', 'the random seed (0 == unspecified)', 0], # [PF_INT32, 'seed', 'the random seed (0 == unspecified)', 0],
# ], # ],
# [ # [
# [&Gimp::PARAM_FLOATARRAY,'noise','the requested number of 1/f noise values'], # [&Gimp::PDB_FLOATARRAY,'noise','the requested number of 1/f noise values'],
# ], # ],
# sub { # sub {
# my ($count, $seed) = @_; # my ($count, $seed) = @_;

View File

@ -29,8 +29,8 @@ Gimp::on_run {
Gimp::on_query { Gimp::on_query {
gimp_install_procedure("plug_in_example_oo", "a test plug-in in perl", gimp_install_procedure("plug_in_example_oo", "a test plug-in in perl",
"try it out", "Marc Lehmann", "Marc Lehmann", "1998-04-27", "try it out", "Marc Lehmann", "Marc Lehmann", "1998-04-27",
N_"<Toolbox>/Xtns/Perl Example Plug-in", undef, PROC_EXTENSION, N_"<Toolbox>/Xtns/Perl Example Plug-in", undef, EXTENSION,
[[PARAM_INT32, "run_mode", "Interactive, [non-interactive]"]], []); [[PDB_INT32, "run_mode", "Interactive, [non-interactive]"]], []);
}; };
exit main; exit main;

View File

@ -84,7 +84,7 @@ sub write_logo {
gimp_image_add_layer ($img,$shadow,1); gimp_image_add_layer ($img,$shadow,1);
gimp_shear ($shadow,1,ORIENTATION_HORIZONTAL,-$th); gimp_shear ($shadow,1,HORIZONTAL,-$th);
gimp_layer_scale ($shadow, $tw, $th*0.3, 1); gimp_layer_scale ($shadow, $tw, $th*0.3, 1);
gimp_layer_translate ($shadow, $th*0.1, $th*0.3); gimp_layer_translate ($shadow, $th*0.1, $th*0.3);
plug_in_gauss_rle ($shadow, 1, 1, 1); plug_in_gauss_rle ($shadow, 1, 1, 1);
@ -139,8 +139,8 @@ sub extension_homepage_logo {
sub query { sub query {
gimp_install_procedure("extension_homepage_logo", "a test extension in perl", gimp_install_procedure("extension_homepage_logo", "a test extension in perl",
"try it out", "Marc Lehmann", "Marc Lehmann", "1997-02-06", "try it out", "Marc Lehmann", "Marc Lehmann", "1997-02-06",
N_"<Toolbox>/Xtns/Homepage-Logo", undef, PROC_EXTENSION, N_"<Toolbox>/Xtns/Homepage-Logo", undef, EXTENSION,
[[PARAM_INT32, "run_mode", "Interactive, [non-interactive]"]], []); [[PDB_INT32, "run_mode", "Interactive, [non-interactive]"]], []);
} }
sub net { sub net {

View File

@ -38,7 +38,7 @@ register "file_miff_save",
my($img,$drawable,$filename) = @_; my($img,$drawable,$filename) = @_;
my($new_img,$new_drawable); my($new_img,$new_drawable);
my $export = Gimp::UI::export_image ($new_img=$img, $new_drawable=$drawable, "MIFF", my $export = Gimp::UI::export_image ($new_img=$img, $new_drawable=$drawable, "MIFF",
CAN_HANDLE_GRAY|CAN_HANDLE_RGB|CAN_HANDLE_ALPHA|CAN_HANDLE_LAYERS|CAN_HANDLE_LAYERS_AS_ANIMATION); EXPORT_CAN_HANDLE_GRAY|EXPORT_CAN_HANDLE_RGB|EXPORT_CAN_HANDLE_ALPHA |EXPORT_CAN_HANDLE_LAYERS|EXPORT_CAN_HANDLE_LAYERS_AS_ANIMATION);
die "export failed" if $export == EXPORT_CANCEL; die "export failed" if $export == EXPORT_CANCEL;
my @layers = $new_img->get_layers; my @layers = $new_img->get_layers;
@ -165,7 +165,7 @@ register "file_miff_load",
if ($comment) { if ($comment) {
$comment =~ s/^\s+//s; $comment =~ s/^\s+//s;
$comment =~ s/\s+$//s; $comment =~ s/\s+$//s;
$img->parasite_attach (new Parasite "gimp-comment", PARASITE_PERSISTENT, $comment); $img->parasite_attach (new GimpParasite "gimp-comment", PARASITE_PERSISTENT, $comment);
} }
# resolution etc.. # resolution etc..

View File

@ -31,19 +31,19 @@ register "mirror_split",
my $temp1 = gimp_layer_copy($layer, 1); my $temp1 = gimp_layer_copy($layer, 1);
if ($mirror == 0) { # upper half if ($mirror == 0) { # upper half
$temp1 = gimp_flip($temp1, ORIENTATION_VERTICAL); $temp1 = gimp_flip($temp1, VERTICAL);
gimp_rect_select($img, 0, $hspan, $w, $h - $hspan, REPLACE, 0, 0); gimp_rect_select($img, 0, $hspan, $w, $h - $hspan, REPLACE, 0, 0);
}; };
if ($mirror == 1) { # lower half if ($mirror == 1) { # lower half
$temp1 = gimp_flip($temp1, ORIENTATION_VERTICAL); $temp1 = gimp_flip($temp1, VERTICAL);
gimp_rect_select($img, 0, 0, $w, $hspan, REPLACE, 0, 0); gimp_rect_select($img, 0, 0, $w, $hspan, REPLACE, 0, 0);
}; };
if ($mirror == 2) { # left half if ($mirror == 2) { # left half
$temp1 = gimp_flip($temp1, ORIENTATION_HORIZONTAL); $temp1 = gimp_flip($temp1, HORIZONTAL);
gimp_rect_select($img, $wspan, 0, $w - $wspan, $h, REPLACE, 0, 0); gimp_rect_select($img, $wspan, 0, $w - $wspan, $h, REPLACE, 0, 0);
}; };
if ($mirror == 3) { # right half if ($mirror == 3) { # right half
$temp1 = gimp_flip($temp1, ORIENTATION_HORIZONTAL); $temp1 = gimp_flip($temp1, HORIZONTAL);
gimp_rect_select($img, 0, 0, $wspan, $h, REPLACE, 0, 0); gimp_rect_select($img, 0, 0, $wspan, $h, REPLACE, 0, 0);
}; };

View File

@ -155,8 +155,8 @@ Gimp::on_query {
Gimp->install_procedure("extension_perl_control_center", "the perl control center gives information about gimp-perl", Gimp->install_procedure("extension_perl_control_center", "the perl control center gives information about gimp-perl",
"The perl control center gives information about the status of gimp-perl and allows configuration of important system parameters", "The perl control center gives information about the status of gimp-perl and allows configuration of important system parameters",
"Marc Lehmann", "Marc Lehmann", $VERSION, "Marc Lehmann", "Marc Lehmann", $VERSION,
N_"<Toolbox>/Xtns/Perl/Control Center...", undef, &Gimp::PROC_EXTENSION, N_"<Toolbox>/Xtns/Perl/Control Center...", undef, &Gimp::EXTENSION,
[[&Gimp::PARAM_INT32, "run_mode", "Interactive, [non-interactive]"]], []); [[&Gimp::PDB_INT32, "run_mode", "Interactive, [non-interactive]"]], []);
}; };
exit Gimp::main; exit Gimp::main;

View File

@ -41,28 +41,28 @@ my $canvas; # the gtklayout widget
my $funclist; my $funclist;
my %type2str = ( my %type2str = (
&PARAM_BOUNDARY => 'BOUNDARY', &PDB_BOUNDARY => 'BOUNDARY',
&PARAM_CHANNEL => 'CHANNEL', &PDB_CHANNEL => 'CHANNEL',
&PARAM_COLOR => 'COLOR', &PDB_COLOR => 'COLOR',
&PARAM_DISPLAY => 'DISPLAY', &PDB_DISPLAY => 'DISPLAY',
&PARAM_DRAWABLE => 'DRAWABLE', &PDB_DRAWABLE => 'DRAWABLE',
&PARAM_FLOAT => 'FLOAT', &PDB_FLOAT => 'FLOAT',
&PARAM_IMAGE => 'IMAGE', &PDB_IMAGE => 'IMAGE',
&PARAM_INT32 => 'INT32', &PDB_INT32 => 'INT32',
&PARAM_FLOATARRAY => 'FLOATARRAY', &PDB_FLOATARRAY => 'FLOATARRAY',
&PARAM_INT16 => 'INT16', &PDB_INT16 => 'INT16',
&PARAM_PARASITE => 'PARASITE', &PDB_PARASITE => 'PARASITE',
&PARAM_STRING => 'STRING', &PDB_STRING => 'STRING',
&PARAM_PATH => 'PATH', &PDB_PATH => 'PATH',
&PARAM_INT16ARRAY => 'INT16ARRAY', &PDB_INT16ARRAY => 'INT16ARRAY',
&PARAM_INT8 => 'INT8', &PDB_INT8 => 'INT8',
&PARAM_INT8ARRAY => 'INT8ARRAY', &PDB_INT8ARRAY => 'INT8ARRAY',
&PARAM_LAYER => 'LAYER', &PDB_LAYER => 'LAYER',
&PARAM_REGION => 'REGION', &PDB_REGION => 'REGION',
&PARAM_STRINGARRAY => 'STRINGARRAY', &PDB_STRINGARRAY => 'STRINGARRAY',
&PARAM_SELECTION => 'SELECTION', &PDB_SELECTION => 'SELECTION',
&PARAM_STATUS => 'STATUS', &PDB_STATUS => 'STATUS',
&PARAM_INT32ARRAY => 'INT32ARRAY', &PDB_INT32ARRAY => 'INT32ARRAY',
); );
sub add_func($$;) { sub add_func($$;) {

View File

@ -34,29 +34,29 @@ for (@ARGV) {
@matches = sort @matches; @matches = sort @matches;
%pf_type2string = ( %pf_type2string = (
&PARAM_INT8 => 'INT8', &PDB_INT8 => 'INT8',
&PARAM_INT16 => 'INT16', &PDB_INT16 => 'INT16',
&PARAM_INT32 => 'INT32', &PDB_INT32 => 'INT32',
&PARAM_FLOAT => 'FLOAT', &PDB_FLOAT => 'FLOAT',
&PARAM_STRING => 'STRING', &PDB_STRING => 'STRING',
&PARAM_INT8ARRAY => 'INT8ARRAY', &PDB_INT8ARRAY => 'INT8ARRAY',
&PARAM_INT16ARRAY => 'INT16ARRAY', &PDB_INT16ARRAY => 'INT16ARRAY',
&PARAM_INT32ARRAY => 'INT32ARRAY', &PDB_INT32ARRAY => 'INT32ARRAY',
&PARAM_FLOATARRAY => 'FLOATARRAY', &PDB_FLOATARRAY => 'FLOATARRAY',
&PARAM_STRINGARRAY => 'STRINGARRAY', &PDB_STRINGARRAY => 'STRINGARRAY',
&PARAM_COLOR => 'COLOUR', &PDB_COLOR => 'COLOUR',
&PARAM_IMAGE => 'IMAGE', &PDB_IMAGE => 'IMAGE',
&PARAM_LAYER => 'LAYER', &PDB_LAYER => 'LAYER',
&PARAM_CHANNEL => 'CHANNEL', &PDB_CHANNEL => 'CHANNEL',
&PARAM_DRAWABLE => 'DRAWABLE', &PDB_DRAWABLE => 'DRAWABLE',
&PARAM_DISPLAY => 'DISPLAY', &PDB_DISPLAY => 'DISPLAY',
&PARAM_SELECTION => 'SELECTION', &PDB_SELECTION => 'SELECTION',
&PARAM_PARASITE => 'PARASITE', &PDB_PARASITE => 'PARASITE',
&PARAM_STATUS => 'STATUS', &PDB_STATUS => 'STATUS',
&PARAM_REGION => 'REGION', &PDB_REGION => 'REGION',
&PARAM_BOUNDARY => 'BOUNDARY', &PDB_BOUNDARY => 'BOUNDARY',
&PARAM_PATH => 'PATH', &PDB_PATH => 'PATH',
); );
sub type2str { sub type2str {
@ -207,11 +207,11 @@ sub gen_va(\@\@) {
} }
sub isarray { sub isarray {
return 1 if $_[0] == &PARAM_INT8ARRAY; return 1 if $_[0] == &PDB_INT8ARRAY;
return 1 if $_[0] == &PARAM_INT16ARRAY; return 1 if $_[0] == &PDB_INT16ARRAY;
return 1 if $_[0] == &PARAM_INT32ARRAY; return 1 if $_[0] == &PDB_INT32ARRAY;
return 1 if $_[0] == &PARAM_FLOATARRAY; return 1 if $_[0] == &PDB_FLOATARRAY;
return 1 if $_[0] == &PARAM_STRINGARRAY; return 1 if $_[0] == &PDB_STRINGARRAY;
return 0; return 0;
} }
@ -219,7 +219,7 @@ sub killcounts(\@) {
my $a = shift; my $a = shift;
my $roa=0; my $roa=0;
for(local $_=0; $_<$#$a; $_++) { for(local $_=0; $_<$#$a; $_++) {
if (isarray ($a->[$_+1][0]) && $a->[$_][0] == &PARAM_INT32) { if (isarray ($a->[$_+1][0]) && $a->[$_][0] == &PDB_INT32) {
splice @$a, $_, 1; splice @$a, $_, 1;
$roa=1; $roa=1;
} }
@ -257,7 +257,7 @@ sub gen_alternatives(\@$\@) {
for my $class (qw( for my $class (qw(
Gimp Layer Image Drawable Selection Channel Display Gimp Layer Image Drawable Selection Channel Display
Palette Plugin Gradients Edit Progress Region Tile Palette Plugin Gradients Edit Progress Region Tile
PixelRgn GDrawable Patterns Parasite PixelRgn GImpDrawable Patterns GimpParasite
)) { )) {
my @pre = @{$class."::PREFIXES"}; my @pre = @{$class."::PREFIXES"};
prefix: prefix:
@ -268,19 +268,19 @@ sub gen_alternatives(\@$\@) {
last if $_ eq $p; last if $_ eq $p;
last prefix if Gimp::_gimp_procedure_available($p.$n2); last prefix if Gimp::_gimp_procedure_available($p.$n2);
} }
if ($class eq "Drawable" && @args && $args[0][0] == &PARAM_DRAWABLE) { if ($class eq "Drawable" && @args && $args[0][0] == &PDB_DRAWABLE) {
push @new, [\@vals,"\$drawable->$n2",[@args[1..$#args]]]; push @new, [\@vals,"\$drawable->$n2",[@args[1..$#args]]];
} elsif ($class eq "Layer" && @args && $args[0][0] == &PARAM_LAYER) { } elsif ($class eq "Layer" && @args && $args[0][0] == &PDB_LAYER) {
push @new, [\@vals,"\$layer->$n2",[@args[1..$#args]]]; push @new, [\@vals,"\$layer->$n2",[@args[1..$#args]]];
} elsif ($class eq "Channel" && @args && $args[0][0] == &PARAM_CHANNEL) { } elsif ($class eq "Channel" && @args && $args[0][0] == &PDB_CHANNEL) {
push @new, [\@vals,"\$channel->$n2",[@args[1..$#args]]]; push @new, [\@vals,"\$channel->$n2",[@args[1..$#args]]];
} elsif ($class eq "Image" && @args && $args[0][0] == &PARAM_IMAGE) { } elsif ($class eq "Image" && @args && $args[0][0] == &PDB_IMAGE) {
push @new, [\@vals,"\$image->$n2",[@args[1..$#args]]]; push @new, [\@vals,"\$image->$n2",[@args[1..$#args]]];
} elsif (@args < 1 or ($args[0][0] != &PARAM_IMAGE } elsif (@args < 1 or ($args[0][0] != &PDB_IMAGE
&& $args[0][0] != &PARAM_DRAWABLE && $args[0][0] != &PDB_DRAWABLE
&& $args[0][0] != &PARAM_CHANNEL && $args[0][0] != &PDB_CHANNEL
&& $args[0][0] != &PARAM_LAYER)) { && $args[0][0] != &PDB_LAYER)) {
if ($class =~ /Gimp|Gradient|Palette|Edit|Patterns|Parasite|PixelRgn/) { if ($class =~ /Gimp|Gradient|Palette|Edit|Patterns|GimpParasite|PixelRgn/) {
push @new, [\@vals,"${class}->$n2",\@args]; push @new, [\@vals,"${class}->$n2",\@args];
} else { } else {
push @new, [\@vals,"$n2$nbsp$class",\@args]; push @new, [\@vals,"$n2$nbsp$class",\@args];
@ -291,10 +291,10 @@ sub gen_alternatives(\@$\@) {
} }
} }
} }
if (@args && $args[0][0] == &PARAM_INT32 && $args[0][1] eq "run_mode") { if (@args && $args[0][0] == &PDB_INT32 && $args[0][1] eq "run_mode") {
push @new, [\@vals,,$name,[@args[1..$#args]]]; push @new, [\@vals,,$name,[@args[1..$#args]]];
} }
if (@args>1 && $args[0][0] == &PARAM_IMAGE && $args[1][0] == &PARAM_DRAWABLE) { if (@args>1 && $args[0][0] == &PDB_IMAGE && $args[1][0] == &PDB_DRAWABLE) {
push @new, [\@vals,,$name,[@args[1..$#args]]]; push @new, [\@vals,,$name,[@args[1..$#args]]];
} }
} }

View File

@ -10,14 +10,14 @@ gchar * T_PV
gint * T_PTROBJ gint * T_PTROBJ
guchar * T_PV guchar * T_PV
GDrawable * T_GDRAWABLE GimpDrawable * T_GDRAWABLE
GTile * T_TILE GimpTile * T_TILE
GPixelRgn * T_PIXELRGN GimpPixelRgn * T_PIXELRGN
GPixelRgn_PDL * T_PIXELRGN_PDL GimpPixelRgn_PDL * T_PIXELRGN_PDL
GtkWidget * T_IV GtkWidget * T_IV
GPixelRgnIterator T_PTROBJ GimpPixelRgnIterator T_PTROBJ
IMAGE T_PREF IMAGE T_PREF
LAYER T_PREF LAYER T_PREF
@ -50,10 +50,10 @@ T_PIXELRGN_PDL
OUTPUT OUTPUT
T_PREF T_PREF
$arg = autobless (newSViv($var), PARAM_$ntype); $arg = autobless (newSViv($var), GIMP_PDB_$ntype);
T_PREF_ANY T_PREF_ANY
$arg = autobless (newSViv($var), PARAM_$ntype); $arg = autobless (newSViv($var), GIMP_PDB_$ntype);
T_GDRAWABLE T_GDRAWABLE