Commit 669c2b22 authored by Marc Lehmann's avatar Marc Lehmann

See the Changes file

parent 3c8f4700
Revision history for Gimp-Perl extension.
1.044
1.044 Sat Oct 24 03:54:47 CEST 1998
- allow PF_PATTERN etc. to be usable as commandline arguments
- added parasite support -> untested so far
- Gimp::Fu wasn't calling Gtk->init anymore
......@@ -10,6 +10,9 @@ Revision history for Gimp-Perl extension.
- many, many configuration changes and hacks
- this is now part of the gimp cvs tree
- changed LIBS by LDLOADLIBS... hacky, but works
- Gimp::Fu will no longer be traced
- a run_mode argument at the beginning can now generally be left out
- re-enabled the testsuite
1.0431 Thu Oct 8 20:01:32 CEST 1998
- compile fix for gimp-1.0
......
......@@ -650,7 +650,6 @@ If anything goes wrong, you only get an execution failure. Switch on
tracing to see which parameters are used to call pdb functions.
This function is never exported, so you have to qualify it when calling.
(not yet implemented for networked modules).
tracemask is any number of the following flags or'ed together.
......@@ -683,6 +682,8 @@ all of the above.
=back
C<set_trace> returns the old tracemask.
=item set_trace(\$tracevar)
write trace into $tracevar instead of printing it to STDERR. $tracevar only
......
......@@ -120,6 +120,9 @@ sub Gimp::RUN_FULLINTERACTIVE { &Gimp::RUN_INTERACTIVE+100 }; # you don't want t
@EXPORT_OK = qw(interact $run_mode save_image);
%EXPORT_TAGS = (params => [@_params]);
# the old value of the trace flag
my $old_trace;
sub import {
undef *{caller()."::main"};
undef *{caller()."::gimp_main"};
......@@ -755,7 +758,9 @@ sub register($$$$$$$$$;@) {
print $function,"(",join(",",(@pre,@_)),")\n" if $Gimp::verbose;
Gimp::set_trace ($old_trace);
my @imgs = &$code(@pre,@_);
$old_trace = Gimp::set_trace (0);
if (@imgs) {
for my $i (0..$#imgs) {
......@@ -906,6 +911,7 @@ sub print_switches {
EOF
print_switches ($this);
} else {
$old_trace = Gimp::set_trace (0);
Gimp::main;
}
};
......
......@@ -880,12 +880,14 @@ PROTOTYPES: ENABLE
# set_trace (\$variable_to_trace_into);
# set_trace (*STDOUT);
#
void
I32
set_trace (var)
CODE:
{
SV *sv = ST (0);
RETVAL = trace;
if (SvROK (sv) || SvTYPE (sv) == SVt_PVGV)
{
if (trace_var)
......@@ -905,6 +907,8 @@ set_trace (var)
else
trace = SvIV (ST (0));
}
OUTPUT:
RETVAL
SV *
_autobless (sv,type)
......@@ -1022,6 +1026,10 @@ gimp_call_procedure (proc_name, ...)
&proc_copyright, &proc_date, &proc_type, &nparams, &nreturn_vals,
&params, &return_vals) == TRUE)
{
int no_runmode = !nparams
|| params[0].type != PARAM_INT32
|| strcmp (params[0].name, "run_mode");
g_free (proc_blurb);
g_free (proc_help);
g_free (proc_author);
......@@ -1031,23 +1039,45 @@ gimp_call_procedure (proc_name, ...)
if (nparams)
args = (GParam *) g_new (GParam, nparams);
for (i = j = 0; i < nparams && j < items; i++)
for(;items;)
{
args[i].type = params[i].type;
if ((!SvROK (ST(j+1)) || i >= nparams-1 || !is_array (params[i+1].type))
&& convert_sv2gimp (croak_str, &args[i], ST(j+1)))
j++;
j = 0;
if (croak_str [0])
{
if (trace & TRACE_CALL)
{
dump_params (i, args, params);
trace_printf (" = [argument error]\n");
}
goto error;
}
if (no_runmode || !SvROK (ST(1)))
for (i = 0; i < nparams && j < items; i++)
{
args[i].type = params[i].type;
if (!i && no_runmode == 2)
args->data.d_int32 = RUN_NONINTERACTIVE;
else if ((!SvROK (ST(j+1)) || i >= nparams-1 || !is_array (params[i+1].type))
&& convert_sv2gimp (croak_str, &args[i], ST(j+1)))
j++;
if (croak_str [0])
{
if (!no_runmode)
{
croak_str [0]=0;
break;
}
if (trace & TRACE_CALL)
{
dump_params (i, args, params);
trace_printf (" = [argument error]\n");
}
goto error;
}
}
if (no_runmode || j >= items-1)
break;
/* very costly, do better! */
no_runmode = 2;
destroy_params (args, nparams);
args = (GParam *) g_new (GParam, nparams);
}
if (trace & TRACE_CALL)
......
......@@ -63,6 +63,14 @@ confusing as well. In cases like this, Gimp allows you to write:
And automatically infers the additional IMAGE-type argument.
As the (currently) last goodie, if the first argument is of type INT32, its
name is "run_mode" and there are no other ambiguties, you can omit it, i.e.
these three calls are equivalent:
plug_in_gauss_rle (RUN_NONINTERACTIVE, $image, $layer, 8, 1, 1);
plug_in_gauss_rle ($image, $layer, 8, 1, 1);
plug_in_gauss_rle ($layer, 8, 1, 1);
You can call all sorts of sensible and not-so-sensible functions,
so this feature can be abused:
......
......@@ -24,12 +24,11 @@ important issues
* zero-copy PDL support
* gimp_init, gimp_deinit
* duplicate HAVE_VPRINTF in gimp
* get rid of superflus image arguments
* put it into the cvs tree
* get rid of superfluous image arguments
[DONE] * put it into the cvs tree
* weighted movement in drawing tools
* -DMIN_PERL_DEFINE
* PF_PALETTE (maybe not)
[DONE] * reset to defaults button
* kill RUN_INTERACTIVE/run_mode-shit
* --function localfunc to select one of the registered scripts
* brush etc. buttons (maybe use gimp's interface, but
......@@ -41,7 +40,6 @@ important issues
* Untitled/0 Untitled/1 etc..
* default parameters at end(!)
* try to deduce default parameters
[DONE] * return values for run()
long term issues and ideas
......
use Test;
use vars '$EXTENSIVE_TESTS';
use vars qw($EXTENSIVE_TESTS $GIMPTOOL);
# the most complicated thing is to set up a working gimp environment. its
# difficult at best...
BEGIN {
plan tests => 13;
plan tests => 17;
}
END {
......@@ -20,8 +23,12 @@ $dir=cwd."/test-dir";
do './config.pl';
ok(1);
ok (($plugins = `$GIMPTOOL -n --install-admin-bin /bin/sh`) =~ s{^.*\s(.*?)(?:/+bin/sh)\r?\n?$}{$1});
ok(-d $plugins);
ok(-x "$plugins/script-fu");
$n=!$EXTENSIVE_TESTS;
$n=1; # disable intensive testing for the moment
#$n=1; # disable intensive testing for the moment
use Gimp qw(:consts);
$loaded = 1;
......@@ -41,6 +48,7 @@ sub net {
system("rm","-rf",$dir); #d#FIXME
ok(sub {mkdir $dir,0700});
ok(sub {symlink "../Perl-Server","$dir/Perl-Server"});
ok(symlink "$plugins/script-fu","$dir/script-fu");
ok (
open RC,">$dir/gimprc" and
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment