Module xlib
Table of contents
Functions
DefaultScreen(display) | Returns the default screen for the given display. |
XDisplayName([name]) | Returns the display name that XOpenDisplay would attempt to use. |
DisplayHeight(display, screen) | Returns the height of the given screen in pixels. |
DisplayHeight(display, screen) | Returns the width of the given screen in pixels. |
XOpenDisplay([display_name]) | Opens a connection to the given display. |
XCloseDisplay(display) | Closes a connection. |
RootWindow(display) | Returns the root window for the given display. |
ScreenCount(display) | Returns the number of screens for the given display. |
XLockDisplay(display) | Locks the given display connection for use with the current thread only. |
XUnlockDisplay(display) | Releases a lock from the given display connection. |
XInternAtom(display, name, only_if_exists) | Returns an atom identifier for the given name. |
XInternAtoms(display, names, only_if_exists) | Returns the atom identifier for a list of names. |
XGetAtomName(display, atom) | Returns the name associated with the given atom. |
XGetAtomNames(display, atoms) | Returns the names associated with the list of atoms. |
Tables
Display |
Functions
DefaultScreen(display)
Returns the default screen for the given display.
Parameters:
-
display
Returns:
XDisplayName([name])
Returns the display name that XOpenDisplay would attempt to use.
If the argument is nil
, XLib will check the DISPLAY
environment variable.
The main use case of this function is to report the name that XOpenDisplay attempted when the initial connection attempt failed.
Parameters:
-
name
Returns:
DisplayHeight(display, screen)
Returns the height of the given screen in pixels.
Parameters:
-
display
-
screen
Returns:
DisplayHeight(display, screen)
Returns the width of the given screen in pixels.
Parameters:
-
display
-
screen
Returns:
XOpenDisplay([display_name])
Opens a connection to the given display.
The connection is closed automatically when the returned handler is garbage collected (i.e. when it goes out of scope).
Parameters:
-
display_name : The connection string. When
nil
, XLib will fall back to the value of theDISPLAY
environment variable.
Returns:
XCloseDisplay(display)
Closes a connection.
Parameters:
-
display
RootWindow(display)
Returns the root window for the given display.
Parameters:
-
display
Returns:
ScreenCount(display)
Returns the number of screens for the given display.
Parameters:
-
display
Returns:
XLockDisplay(display)
Locks the given display connection for use with the current thread only.
Other threads attempting to use the same connection will block until it is unlocked with XUnlockDisplay. Calls to this function may be nested.
Parameters:
-
display
XUnlockDisplay(display)
Releases a lock from the given display connection.
Parameters:
-
display
XInternAtom(display, name, only_if_exists)
Returns an atom identifier for the given name.
Parameters:
-
display
-
name
-
only_if_exists
Returns:
XInternAtoms(display, names, only_if_exists)
Returns the atom identifier for a list of names.
Parameters:
-
display
-
names : A list of strings.
-
only_if_exists
Returns:
-
An Xlib
Status
. -
XGetAtomName(display, atom)
Returns the name associated with the given atom.
Parameters:
-
display
-
atom : An X11
Atom
.
Returns:
XGetAtomNames(display, atoms)
Returns the names associated with the list of atoms.
Parameters:
-
display
-
atoms : A list of numbers.
Returns:
Tables
Display