NAME

App::MathImage::X11::Protocol::MoreUtils -- miscellaneous X11::Protocol helpers

SYNOPSIS

use App::MathImage::X11::Protocol::MoreUtils;

DESCRIPTION

This is some extra helper functions for X11::Protocol.

FUNCTIONS

$number = App::MathImage::X11::Protocol::MoreUtils::root_to_screen_number ($X, $root)
$hashref = App::MathImage::X11::Protocol::MoreUtils::root_to_screen_info ($X, $root)

$root should be an integer XID. If it's one of the root windows of the $X server then return the screen number or the screen info hashref for the screen of that root window, otherwise return undef.

App::MathImage::X11::Protocol::MoreUtils::visual_is_dynamic ($X, $visual_id)
App::MathImage::X11::Protocol::MoreUtils::visual_class_is_dynamic ($X, $visual_class)

Return true if the given visual is dynamic, meaning its colormap entries can be changed to change the colour of a given pixel value.

$visual_id is one of the visual numbers, ie. one of the keys in $X->{'visuals'}. Or $visual_class is a string like "PseudoColor" or corresponding integer value for that constant such as 3.

($width, $height) = App::MathImage::X11::Protocol::MoreUtils::window_size ($X, $window)
$visual_id = App::MathImage::X11::Protocol::MoreUtils::window_visual ($X, $window)

Return the size or visual ID of a given window.

$window should be an integer XID. If it's one of the root windows then the information is obtained from the corresponding screen info in $X, otherwise the server is queried with GetGeometry or GetWindowAttributes.

These functions are handy when there's a good chance that $window might be a root window and therefore not need a server round trip.

SEE ALSO

math-image

HOME PAGE

http://user42.tuxfamily.org/math-image/index.html

LICENSE

Copyright 2010, 2011 Kevin Ryde

Math-Image is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

Math-Image is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Math-Image. If not, see <http://www.gnu.org/licenses/>.