X11::Protocol, version 0.56
Copyright (C) 1997-2006 Stephen McCamant. All rights reserved. This module is free software; you can redistribute and/or modify it under the same terms as Perl itself. (As an exception, the file Keysyms.pm, which is derived from a file in the standard X11 distribution, has another, less restrictive copying policy, as do some of the extension modules in the directory Protocol/Ext: see those files for details).
Module list information:123456789 123456789 123456789 123456789 12345 X11::Protocol bdpO Raw interface to X Window System servers X11::Keysyms bdpf X11 key symbols (translation of keysymdef.h) X11::Auth bdpO Read and handle X11 '.Xauthority' files
New in this version: 0.56
X11::Protocol and the related modules in this distribution are a rough equivalent of Xlib (libX11.a, with a bit of Xau and Xext mixed in) used for drawing windows on and otherwise manipulating X11 window servers.
OTHER THINGS YOU NEED
tested with 5.6.1 and 5.8.*)
computer, but you must be able to connect to it over a socket. For Win32 users, a free X server is apparently available from http://sources.redhat.com/win32-x11/ though the author hasn't tried it)
http://cvs.freedesktop.org/checkout/xorg/xc/doc/hardcopy/XProtocol/proto.PS.gz
For Debian users, this is in the xspecs package.
Speaking of Debian, this module is also available as the Debian package "libx11-protocol-perl"; thanks to tony mancill for maintaing it.
*********************** NOTE ***********************
Like any other module:
% perl Makefile.PL
% make
% make test
% make install
DOCUMENTATION
See the PODs at the end of each .pm file (converted into man pages by the makefile) for detailed information.
EXAMPLES
test.pl is a good example of a complete program; it's also a translation of an Xlib based program (in this case, `basicwin' from O'Reilly & Associates's Xlib Programming Manual).
eg/anim.pl demonstrates buffered animation (needs IO::Select).
eg/full_test.pl uses just about every request in the protocol. You might not want to run it, since it can do weird things to your display, but it can show prototype calls if the documentation is unclear.
eg/long-run.pl is a program that runs for a long time and allocates many windows, as a stress-test of the resource-allocation code.
eg/random-win.pl demonstrates how to handle requests that might cause errors, by picking random resource identifiers and trying to paint over them with randomly-colored rectangles if they're windows.
eg/render-clock.pl uses the Render extension to draw an analog clock. It's a bit spiffier that "xclock -render", in the author's opinion, but falls short of fdclock.
eg/render-test.pl is like eg/full_test.pl, but just for the Render extension.
eg/teletype.pl shows how it's possible to connect to more than one server at once (needs IO::Select).
eg/widgets* are four examples that all do the same thing, with different tools. They demonstrate all the techniques needed to implement two simple custom widgets, a scroll bar and a progress meter, with the different options available for X11 programming from Perl:
eg/wintree.pl is a small utility that acts like a cross between xlsclients, xwininfo, and pstree, showing the hierarchy of windows and their parents. Takes a window ID, or by default starts at the root. "-g" includes geometries, "-v" uses VT100 line drawing characters. Beware that it hardcodes some assumptions about how certain X servers encode resource IDs.
SEE ALSO
This is by no means the only way to put windows up on an X server from Perl.
Send questions, bug reports, and feature requests to me, Stephen McCamant <SMCCAM@cpan.org>.