1 # test.pl - Lucas Brutschy <lbrutschy@users.sourceforge.net>, 2006
3 # Small, non-exhaustive adesklets test script:
4 # - Resize adesklets window to 100x100 pixels
5 # - Set it to be pseudo-transparent
6 # - Draw a translucent light grey rectangle on it
8 # - Mark with a red dot the pointer position every time
12 # - Install adesklets with perl support enabled (default)
13 # - Run perl test.py from this directory
18 adesklets
::open_streams
();
20 # these are just normal adesklet commands
21 adesklets
::window_resize
(100,100);
22 adesklets
::window_reset
(adesklets
::WINDOW_UNMANAGED
);
23 adesklets
::window_set_transparency
(1);
24 adesklets
::context_set_color
(255,255,255,64);
25 adesklets
::image_fill_rectangle
(5,5,90,90);
26 adesklets
::window_show
();
28 adesklets
::event_loop
(ButtonPress
=>\
&onbutton
); # supply a hash of callbacks
29 adesklets
::close_streams
();
34 adesklets
::context_set_color
(255,0,0,255);
35 adesklets
::image_fill_rectangle
($x,$y,3,3);