X11::Xlib - Low level access to the X11 library
use X11::Xlib; my $display = X11::Xlib->new(); ...
The X11::Xlib module provide low level access to X11 libary function.
This include access to some X11 extension like the X11 test library (xtst).
Instanciate a new X11::Xlib access. This object contains the connection to the X11 display.
The $display variable specify the display adress to open. If unset the $DISPLAY envirronement variable is used.
$display
$DISPLAY
Return the width of the screen number $screen (or 0 if not specified).
$screen
Return the height of the screen number $screen (or 0 if not specified).
Fake a mouse movement on screen number $screen to position $x,$y.
$x
$y
The optional $EventSendDelay is a delay to wait before sending the event in milliseconds, default value is 10.
Simulate an action on mouse button number $button. $pressed indicate if the button is either pressed (True) or released (False).
$button
$pressed
Simulate an event on any key on the keyboard. $kc is the key code (8 to 255) and $pressed indicate if the key get pressed or released.
$kc
Make the Xserver emit a sound.
Return an array of the key code currently pressed on the keyboard.
Return a mask value for keyboard leds currently on.
Flush pending events sent with *Fake* functions to X11 server.
This function must be used to make fake event taking effect.
Force Xserver to sync event. The optionnal $flush allow to discard pending event.
Return a X11::Xlib::Window object corresponding to the X11 root window.
Return the human readable string for caracter number $keysym.
XKeysymToString is the exact reverse of XStringToKeysym.
Return the keysym number for human readable caracter $string.
XStringToKeysym is the exact reverse of XKeysymToString.
Return true if $keysym is a function key (F1 .. F35)
Return true is $keysym is on numeric pad
$keysym
Return true is key is... honestly don't know :\
Return true if $keysym is a modifier key (Shift, Alt).
No idea.
No more idea.
Return the key code returning the caracter number $keysym.
Return an array of caracter number corresponding to the key $keycode.
Each value in the array correspond to the action of a key modifier (Shift, Alt).
The $count is the number of keycode to return. Default value is 1, eg returning caracter for the given $keycode.
This module provide the same functions but with a high level approach.
Functions provided by this modules are mostly include in Gtk2 binding, but trough Gtk API and perl objects.
This module is still incompleted, but patch are welcome :)
Olivier Thauvin, <nanardon@nanardon.zarb.org>
Copyright (C) 2009 by Olivier Thauvin
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.
To install X11::Xlib, copy and paste the appropriate command in to your terminal.
cpanm
cpanm X11::Xlib
CPAN shell
perl -MCPAN -e shell install X11::Xlib
For more information on module installation, please visit the detailed CPAN module installation guide.