Please re-read the doc. There are no such things as direct or
indirect commands, there are only direct and indirect modes,
and all commands can successfully be used in both, as
illustrated above for command
load_image.
that means commands, that give you something back like
load_image are direct commands?
Well, not exactly. That means that you cannot dynamically
evaluate return values in indirect mode: it doesn't means you
cannot successfully invoke the commands. ;-) adesklets is a
stateful, stack-based console, and many image manipulation
sequences can easily be performed "blindly" without
intervention from the driving script -- that's when indirect
mode might be handy (animations, optimization for "heavy"
desklets).
As for a potential problem with command
clone_image, everything seems working
fine:
use strict;
use adesklets;
adesklets::open_streams();
adesklets::context_set_image(1);
my $img = adesklets::clone_image();
print "Image ID: $img\n";
Output:
Do you want to (r)egister this desklet or to (t)est it? t
Now testing...
============================================================
If you do not see anything (or just an initial flicker
in the top left corner of your screen), try `--help',
and see the FAQ: `info adesklets'.
============================================================
Image ID: 2
Of course, the Perl bindings are pretty new, and I don't
guarantee there are no API glitches -- I don't think this is
one though: please share reproducible evidence (i.e.
runnable, short code showing the problem) if you think
otherwise. Yours,