NAME
X11::Xlib::Window - XID wrapper for Window
SYNOPSIS
use X11::Xlib;
my $display = X11::Xlib->new();
my $window = $display->RootWindow();
...
METHODS
(see X11::Xlib::XID for inherited methods/attributes)
attributes
Calls "XGetWindowAttributes" in X11::Xlib, caches the result, and returns the instance of X11::Xlib::XWindowAttributes.
clear_all
Clear any cached value of the window so that the next access loads it fresh from the server.
event_mask
my $current_mask= $window->event_mask;
$window->event_mask( $current_mask | SubstructureRedirectMask );
Get or set the event mask. Reading this value may return cached data, or else cause a call to XGetWindowAttibutes. Setting the event mask uses XSelectInput, and updates the cache.
event_mask_include
$window->event_mask_include( @event_masks );
Read the current event mask (unless cached already), then bitwise OR it with each parameter, then set the mask on the window if anything changed.
event_mask_exclude
$window->event_mask_exclude( @event_masks );
Read the current event mask (unless cached already), then bitwise AND NOT with each parameter, then set the mask on the window if anything changed.
get_w_h
my ($w, $h)= $window->get_w_h
Return width and height of the window by calling XGetGeometry. This never uses a cache and always returns the current size of the window, since often it has been altered by window managers etc.
For a cached value, just use $window->attributes->width
etc.
show
$win->show;
$win->show(1);
$win->show(0); # equivalent to 'hide'
Calls XMapWindow to request that the X server display the window.
You can pass a boolean argument to conditionally call "hide" instead.
hide
Calls XUnmapWindow to request the window be hidden.
set_bounding_region
$window->set_bounding_region($region);
$window->set_bounding_region($region, $x_ofs, $y_ofs);
Set the region for the boundary of the window, optionally offset by an (x,y) coordinate. $region
may be undef or 0 to un-set the region.
set_input_region
$window->set_input_region($region);
$window->set_input_region($region, $x_ofs, $y_ofs);
Set the input "hit" region of the window, optionally offset by an (x,y) coordinate. $region
may be undef or 0 to un-set the region.
SEE ALSO
AUTHOR
Olivier Thauvin, <nanardon@nanardon.zarb.org>
Michael Conrad, <mike@nrdvana.net>
COPYRIGHT AND LICENSE
Copyright (C) 2009-2010 by Olivier Thauvin
Copyright (C) 2017 by Michael Conrad
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.