[Pdx-pm] "Final report" for Mozilla Foundation and TPF Perl 6 development grant

chromatic chromatic at wgz.org
Fri Sep 12 11:09:02 PDT 2008

On Friday 12 September 2008 01:50:26 Eric Wilhelm wrote:

> I was hoping to include a module, but I'm not readily finding an example
> and this is getting long anyway.

Test.pm, Xlib.pm (for everyone enlightened enough to use X.org or an 
equivalent).  See examples/nci/xlibtest.p6:

use Xlib;

say 'Hello';

say 'Display: ', Xlib::DisplayName();

my $display = Xlib::OpenDisplay('');

say 'Default screen: ', $display.DefaultScreen();


my $white  = $display.WhitePixel(0);
my $root   = $display.RootWindow();
my $window = $display.CreateSimpleWindow($root, 0, 0, 600, 400, 0, 0, $white);
$window.StoreName("Hello, perl6");

Note that while Xlib calls functions in the xlib shared library, the bindings 
themselves require no one to write C code beyond what Parrot already 

-- c

More information about the Pdx-pm-list mailing list