see plug-ins/perl/Changes
This commit is contained in:
@ -1,5 +1,12 @@
|
||||
Revision history for Gimp-Perl extension.
|
||||
|
||||
- removed compatibility code from Lib.xs.
|
||||
- call the XS version of gimp_progress_init when only
|
||||
one argument is given.
|
||||
- re-added PARASITE_*-constants (including UNDOABLE variants).
|
||||
- :auto is NO LONGER the default for the import method(!).
|
||||
(NOT YET).
|
||||
|
||||
1.083 Wed May 12 03:36:10 CEST 1999
|
||||
- took a modified enums.pl to autogenerate constants. Some constants
|
||||
have changed:
|
||||
|
@ -13,7 +13,7 @@ use subs qw(init end lock unlock canonicalize_color);
|
||||
require DynaLoader;
|
||||
|
||||
@ISA=qw(DynaLoader);
|
||||
$VERSION = 1.083;
|
||||
$VERSION = 1.084;
|
||||
|
||||
@_param = qw(
|
||||
PARAM_BOUNDARY PARAM_CHANNEL PARAM_COLOR PARAM_DISPLAY PARAM_DRAWABLE
|
||||
@ -46,8 +46,9 @@ $VERSION = 1.083;
|
||||
'REPEAT_TRIANGULAR', 'BG_BUCKET_FILL', 'FG_BUCKET_FILL', 'PATTERN_BUCKET_FILL',
|
||||
#ENUM_NAME#
|
||||
'STATUS_CALLING_ERROR', 'STATUS_EXECUTION_ERROR', 'STATUS_PASS_THROUGH',
|
||||
'STATUS_SUCCESS', 'PARASITE_PERSISTANT', 'PARASITE_ATTACH_PARENT',
|
||||
'STATUS_SUCCESS', 'PARASITE_PERSISTENT', 'PARASITE_ATTACH_PARENT',
|
||||
'PARASITE_PARENT_PERSISTENT', 'PARASITE_ATTACH_GRANDPARENT', 'PARASITE_GRANDPARENT_PERSISTENT',
|
||||
'PARASITE_UNDOABLE', 'PARASITE_PARENT_UNDOABLE', 'PARASITE_GRANDPARENT_UNDOABLE',
|
||||
'TRACE_NONE', 'TRACE_CALL', 'TRACE_TYPE', 'TRACE_NAME', 'TRACE_DESC', 'TRACE_ALL',
|
||||
);
|
||||
|
||||
@ -102,7 +103,7 @@ sub import($;@) {
|
||||
|
||||
# make a quick but dirty guess ;)
|
||||
|
||||
@_=(@_procs,':auto') unless @_;
|
||||
@_=(@_procs,':consts',':auto') unless @_;
|
||||
|
||||
for(@_) {
|
||||
if ($_ eq ":auto") {
|
||||
@ -517,7 +518,7 @@ sub new($$$$$$$$) {
|
||||
package Gimp::Parasite;
|
||||
|
||||
sub is_type($$) { $_[0]->[0] eq $_[1] }
|
||||
sub is_persistant($) { $_[0]->[1] & PARASITE_PERSISTANT }
|
||||
sub is_persistant($) { $_[0]->[1] & &Gimp::PARASITE_PERSISTANT }
|
||||
sub is_error($) { !defined $_[0]->[0] }
|
||||
sub has_flag($$) { $_[0]->[1] & $_[1] }
|
||||
sub copy($) { [@{$_[0]}] }
|
||||
@ -567,7 +568,7 @@ decision I believe...
|
||||
|
||||
=head2 IMPORT TAGS
|
||||
|
||||
If you don't specify any import tags, Gimp assumes :consts
|
||||
If you don't specify any import tags, Gimp assumes C<qw/:consts main xlfd_size/>
|
||||
which is usually what you want.
|
||||
|
||||
=over 4
|
||||
@ -588,7 +589,7 @@ All constants from gimpenums.h (BG_IMAGE_FILL, RUN_NONINTERACTIVE, NORMAL_MODE,
|
||||
|
||||
=back
|
||||
|
||||
The default (unless '' is specified) is C<main xlfd_size :auto>.
|
||||
The default (unless '' is specified) is C<main xlfd_size :consts>.
|
||||
|
||||
=head1 GETTING STARTED
|
||||
|
||||
|
@ -81,6 +81,17 @@ BOOT:
|
||||
newCONSTSUB(stash,"PARAM_STRINGARRAY",newSViv(PARAM_STRINGARRAY));
|
||||
#if GIMP_PARASITE
|
||||
newCONSTSUB(stash,"PARAM_PARASITE",newSViv(PARAM_PARASITE));
|
||||
|
||||
newCONSTSUB(stash,"PARASITE_PERSISTENT",newSViv(PARASITE_PERSISTENT));
|
||||
newCONSTSUB(stash,"PARASITE_UNDOABLE",newSViv(PARASITE_UNDOABLE));
|
||||
|
||||
newCONSTSUB(stash,"PARASITE_ATTACH_PARENT",newSViv(PARASITE_ATTACH_PARENT));
|
||||
newCONSTSUB(stash,"PARASITE_PARENT_PERSISTENT",newSViv(PARASITE_PARENT_PERSISTENT));
|
||||
newCONSTSUB(stash,"PARASITE_PARENT_UNDOABLE",newSViv(PARASITE_PARENT_UNDOABLE));
|
||||
|
||||
newCONSTSUB(stash,"PARASITE_ATTACH_GRANDPARENT",newSViv(PARASITE_ATTACH_GRANDPARENT));
|
||||
newCONSTSUB(stash,"PARASITE_GRANDPARENT_PERSISTENT",newSViv(PARASITE_GRANDPARENT_PERSISTENT));
|
||||
newCONSTSUB(stash,"PARASITE_GRANDPARENT_UNDOABLE",newSViv(PARASITE_GRANDPARENT_UNDOABLE));
|
||||
#endif
|
||||
|
||||
newCONSTSUB(stash,"PROC_EXTENSION",newSViv(PROC_EXTENSION));
|
||||
|
@ -588,7 +588,7 @@ sub net {
|
||||
my $this = this_script;
|
||||
my(%map,@args);
|
||||
my($interact)=1;
|
||||
my $params = $this->[8];
|
||||
my $params = $this->[9];
|
||||
|
||||
for(@{$this->[11]}) {
|
||||
return unless fu_feature_present($_,$this->[1]);
|
||||
@ -1098,7 +1098,7 @@ sub save_image($$) {
|
||||
# provide some clues ;)
|
||||
sub print_switches {
|
||||
my($this)=@_;
|
||||
for(@{$this->[8]}) {
|
||||
for(@{$this->[9]}) {
|
||||
my $type=$pf_type2string{$_->[0]};
|
||||
my $key=mangle_key($_->[1]);
|
||||
printf " -%-25s %s%s\n","$key $type",$_->[2],defined $_->[3] ? " [$_->[3]]" : "";
|
||||
|
@ -38,10 +38,13 @@ bootstrap Gimp::Lib $VERSION;
|
||||
# various functions for 1.0 compatibility
|
||||
|
||||
sub gimp_progress_init {
|
||||
push @_,-1 if @_<2;
|
||||
if (@_<2) {
|
||||
goto &_gimp_call_procedure;
|
||||
} else {
|
||||
eval { gimp_call_procedure "gimp_progress_init",@_ };
|
||||
gimp_call_procedure "gimp_progress_init",shift if $@;
|
||||
}
|
||||
}
|
||||
|
||||
# functions to "autobless" where the autobless mechanism
|
||||
# does not work.
|
||||
|
@ -29,15 +29,6 @@
|
||||
#include "XSUB.h"
|
||||
#include "ppport.h"
|
||||
|
||||
/* I actually do care a bit about older perls... */
|
||||
#ifndef ERRSV
|
||||
# define ERRSV perl_get_sv("@",FALSE)
|
||||
#endif
|
||||
/* And also for newer perls... */
|
||||
#ifndef dTHR
|
||||
# define dTHR (void)0
|
||||
#endif
|
||||
|
||||
/* dirty is used in gimp.h AND in perl < 5.005 or with PERL_POLLUTE. */
|
||||
#ifdef dirty
|
||||
# undef dirty
|
||||
@ -1834,6 +1825,19 @@ gimp_patterns_get_pattern_data(name)
|
||||
|
||||
PROTOTYPES: ENABLE
|
||||
|
||||
void
|
||||
_gimp_progress_init (message)
|
||||
gchar * message
|
||||
CODE:
|
||||
gimp_progress_init (message);
|
||||
|
||||
#ifdef GIMP_HAVE_DEFAULT_DISPLAY
|
||||
|
||||
DISPLAY
|
||||
gimp_default_display()
|
||||
|
||||
#endif
|
||||
|
||||
# functions using different calling conventions:
|
||||
#void
|
||||
#gimp_channel_get_color(channel_ID, red, green, blue)
|
||||
|
@ -91,7 +91,7 @@ other way to access the raw pixeldata in Gimp.
|
||||
|
||||
Some exmaples:
|
||||
|
||||
$region = $drawable->pixel_rgn (0,0, 100,100, 1,0);
|
||||
$region = $drawable->get->pixel_rgn (0,0, 100,100, 1,0);
|
||||
$pixel = $region->get_pixel (5,7); # fetches the pixel from (5|7)
|
||||
print $pixel; # outputs something like
|
||||
# [255, 127, 0], i.e. in
|
||||
@ -108,6 +108,6 @@ Marc Lehmann <pcg@goof.com>
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
perl(1), Gimp(1).
|
||||
L<Gimp::Pixel>, perl(1), Gimp(1).
|
||||
|
||||
=cut
|
||||
|
@ -273,14 +273,19 @@ close C;
|
||||
print "ok\n";
|
||||
|
||||
$GIMP_INC_NOUI = "-I../../ $GIMP_INC_NOUI" if $IN_GIMP;
|
||||
|
||||
@DIRS= 'Gimp';
|
||||
if ($IN_GIMP) {
|
||||
|
||||
$build_module = $IN_GIMP || $ENV{GIMP_PERL_MODULE_INC};
|
||||
|
||||
print "building embedded perl module... ";
|
||||
if ($build_module) {
|
||||
print "yes\n";
|
||||
$dont_embed = "false";
|
||||
push(@DIRS,'nolib');
|
||||
print "configuring in embed/Makefile...\n";
|
||||
system("cd embed && perl Makefile.PL");
|
||||
} else {
|
||||
print "no\n";
|
||||
$dont_embed = "true";
|
||||
}
|
||||
|
||||
|
@ -10,38 +10,44 @@ make test TEST_VERBOSE=1
|
||||
|
||||
bugs
|
||||
|
||||
* disable module build (EMBEDMYALLOC)
|
||||
* turn -1 into undef and vice versa.
|
||||
* not calling unload -> coredump
|
||||
* $Config{cc} might not understand Gimps CFLAGS (-mpentium).
|
||||
* do NOT modinstall with older gimp versions (!!!!!!!!!)
|
||||
[DONE] * make parasiterc ascii-only !!!!
|
||||
[DONE] * do NOT modinstall with older gimp versions (!!!!!!!!!)
|
||||
* improve examples/example-*.pl
|
||||
* install in /usr/local (???? why? more options??)
|
||||
* install even without Gtk? NO!
|
||||
[KILL] * perl_fu_webify in homepage-logo.pl
|
||||
[KILL] * install in /usr/local (???? why? more options??)
|
||||
[DONE] * install even without Gtk? NO!
|
||||
* wait for working gimp_file_load (or do it myself?)
|
||||
* get rid of xs_exit. please please fuck me plenty.
|
||||
* do not install scm2scm and scm2perl on 56.004
|
||||
[KILL] * do not install scm2scm and scm2perl on 56.004
|
||||
* create gimpstyle.pod
|
||||
* get rid of ':auto'
|
||||
|
||||
important issues
|
||||
|
||||
* pdb_proc_renameto
|
||||
* gimp_progress_init (1 & 2 args)
|
||||
* gimp_default_display (...) for libgimp
|
||||
* Gimp::Module for modules (!)
|
||||
* gimp_progress_close
|
||||
* PerlCC configurable options for Perl-Server startup, Gipm_host etc.
|
||||
* implement CALLBACKS via the Perl-Server
|
||||
* PF_COORDS (just as Light Effects/FlareFX)
|
||||
* PF_PREVIEW(!)
|
||||
[PF_FILE] * PF_FILE
|
||||
* --use-interp=perl|script-fu
|
||||
[DONE] * --use-interp=perl|script-fu
|
||||
* change set_usize to something else..
|
||||
* Gimp::IO (?)
|
||||
* Gimp::Fu import after Gimp? use Gimp::main for Gimp::Fu??
|
||||
* generic config query mechanism
|
||||
[DONE] * generic config query mechanism
|
||||
* install scripts in share/
|
||||
* register dummy function to calm gimp down
|
||||
* config options & paths in module(!)
|
||||
* Gimp::Module for modules (!)
|
||||
* register dummy function to calm gimp down (really??)
|
||||
[DONE] * config options & paths in module(!)
|
||||
* gimp->object_id, drawable_object_id remove!
|
||||
* gimp_display_image
|
||||
* vamp up homepage
|
||||
* --ui and --noui for Gimp::Fu
|
||||
* Gimp::ping
|
||||
* clean up PKG_ANY vs. PKG_REAL_DRAWABLE
|
||||
[KILL] * clean up PKG_ANY vs. PKG_REAL_DRAWABLE
|
||||
* allow plug-ins to register with only a drawable argument(!)
|
||||
(fix this in Gimp)
|
||||
* gradient button
|
||||
|
@ -50,7 +50,7 @@ WriteMakefile(
|
||||
INSTALLDIRS => 'perl',
|
||||
INSTALLARCHLIB => '/tmp',
|
||||
OBJECT => 'perlmod$(OBJ_EXT) perlxsi$(OBJ_EXT)',
|
||||
INC => "$INC1 $GIMP_INC_NOUI $_ccopts $_gccflags $CPPFLAGS $CFLAGS $DEFS".($IN_GIMP ? " -DIN_GIMP" : ""),
|
||||
INC => "$INC1 $GIMP_INC_NOUI $_ccopts $_gccflags $CPPFLAGS $CFLAGS $DEFS $ENV{GIMP_PERL_MODULE_INC}".($IN_GIMP ? " -DIN_GIMP" : ""),
|
||||
DEFINE => "$DEFINE1",
|
||||
macro => \%cfg,
|
||||
dynamic_lib => { OTHERLDFLAGS => "$LDFLAGS $LIBS $_ldopts $_gldflags" },
|
||||
|
@ -16,6 +16,14 @@ static GimpModuleInfo info = {
|
||||
"1999-04-14"
|
||||
};
|
||||
|
||||
void ERR(char *msg)
|
||||
{
|
||||
STRLEN dc;
|
||||
dTHR;
|
||||
|
||||
fprintf (stderr, "(Perl module error, please report!) %s: %s\n", msg, SvPV(ERRSV,dc));
|
||||
}
|
||||
|
||||
static PerlInterpreter *interp;
|
||||
|
||||
static int perl_init(void)
|
||||
@ -30,13 +38,29 @@ static int perl_init(void)
|
||||
if (interp)
|
||||
{
|
||||
perl_construct(interp);
|
||||
{
|
||||
dTHR; /* NOT earlier! */
|
||||
|
||||
perl_parse(interp, xs_init, 3, embedding, NULL);
|
||||
perl_eval_pv ("require Gimp::Module", TRUE);
|
||||
|
||||
res = perl_eval_pv ("Gimp::Module::_init()", TRUE);
|
||||
if (SvTRUE (ERRSV))
|
||||
{
|
||||
ERR ("error during require Gimp::Module, perl NOT initialized!");
|
||||
return GIMP_MODULE_UNLOAD;
|
||||
}
|
||||
|
||||
res = perl_eval_pv ("Gimp::Module::_init()", FALSE);
|
||||
if (SvTRUE (ERRSV))
|
||||
{
|
||||
ERR ("error during require Gimp::Module::_init(), perl NOT initialized!");
|
||||
return GIMP_MODULE_UNLOAD;
|
||||
}
|
||||
|
||||
if (res && SvIOK (res))
|
||||
return SvIV (res);
|
||||
}
|
||||
}
|
||||
|
||||
return GIMP_MODULE_UNLOAD;
|
||||
}
|
||||
@ -46,10 +70,16 @@ static int perl_init(void)
|
||||
|
||||
static void perl_deinit(void)
|
||||
{
|
||||
dTHR;
|
||||
|
||||
if (interp)
|
||||
{
|
||||
perl_run(interp);
|
||||
perl_eval_pv ("Gimp::Module::_deinit()", TRUE);
|
||||
perl_eval_pv ("Gimp::Module::_deinit()", FALSE);
|
||||
|
||||
if (SvTRUE (ERRSV))
|
||||
ERR ("error during require Gimp::Module::_init()");
|
||||
|
||||
PL_perl_destruct_level = 0;
|
||||
perl_destruct(interp);
|
||||
perl_free(interp);
|
||||
@ -79,7 +109,7 @@ module_unload (void *shutdown_data,
|
||||
void *completed_data)
|
||||
{
|
||||
perl_deinit ();
|
||||
/* perl is unloadable, *sigh* */
|
||||
/* perl is unloadable (atexit & friends), *sigh* */
|
||||
/* completed_cb (completed_data); */
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use Gimp::Feature qw(gtk perl-5.005);
|
||||
use Gimp 1.06;
|
||||
use Gimp 1.06 ':auto';
|
||||
use Gimp::Fu;
|
||||
use Gtk;
|
||||
BEGIN { eval "use Image::Magick 1.45"; $@ and Gimp::Feature::missing ("Image::Magick version 1.45 or higher") };
|
||||
|
Reference in New Issue
Block a user