Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

.ns

\\$1 ..

XINERAMA __libmansuffix__ __vendorversion__
NAME
Xinerama - API for Xinerama extension to X11 Protocol
SYNOPSIS
#include <X11/extensions/Xinerama.h>
Bool XineramaQueryExtension \^(\^Display *dpy,
 int *event_base_return, int *error_base_return\^);
Status XineramaQueryVersion \^(\^Display *dpy,
 int *major_version_return,
 int *minor_version_return\^);
Bool XineramaIsActive \^(\^Display *dpy\^);
XineramaScreenInfo * XineramaQueryScreens \^(\^Display *dpy,
 int *number\^);
ARGUMENTS
display 1i
Specifies the connection to the X server.
event_base_return 1i
Specifies the return location for the assigned base event code
error_base_return 1i
Specifies the return location for the assigned base error code
major_version_return 1i
Returns the major version supported by the server
minor_version_return 1i
Returns the minor version supported by the server
number 1i
Returns the number of entries in the returned XineramaScreenInfo array.
DESCRIPTION
Xinerama is a simple library designed to interface the Xinerama Extension for retrieving information about physical output devices which may be combined into a single logical X screen.
FUNCTIONS
XineramaQueryExtension()

The XineramaQueryExtension function queries the Xserver to determine the availability of the Xinerama Extension. If the extension is available, the return value is True, and event_base_return and error_base_return are set to the base event number and base error number for the extension, respectively. Otherwise, the return value is False, and the values of event_base_return and error_base_return are undefined.

XineramaQueryVersion()

The XineramaQueryVersion function returns the version of the Xinerama extension implemented by the Xserver. The version is returned in major_version_return and minor_version_return. The major version will be incremented for protocol incompatible changes, and the minor version will be incremented for small, upwardly compatible changes.

If the Xinerama library is compatible with the version returned by the server, it returns nonzero. If the server does not support the XINERAMA extension, or if there was an error during communications with the server, or if the server and library protocol versions are incompatible, it returns zero.

XineramaIsActive()

The XineramaIsActive function returns a Boolean operator used to determine if Xinerama is activated on the screen. Returns True for active and False for not active.

XineramaQueryScreens()

The XineramaQueryScreens() function returns info about each individual output device within the Xinerama Screen. The integer pointed to by the number argument is updated to the number of output devices listed in the returned array of XineramaScreenInfo structures. XineramaQueryScreens() returns NULL and sets number to 0 if Xinerama is not active. The pointer returned should be released with XFree(__libmansuffix__) when no longer needed.

NOTE
The original API provided for interacting with the XINERAMA extension used function names beginning with XPanoramiX. That API is now deprecated and this API should be used instead in new software.