Kanzi  3.9.9
Kanzi Engine C++ API
kanzi::x11::X11Window Class Reference

An X11 window. More...

#include <kanzi/core.ui/platform/windowing_ng/x11/x11_window.hpp>

Public Member Functions

bool bringToFront (const X11Display &display) noexcept
 Brings a window in front of all other windows in the z-order. More...
 
void destroy (const X11Display &display) noexcept
 Destroys a window and all its associated data. More...
 
KZ_NO_DISCARD Window getNativeHandle () const noexcept
 Gets the native handle. More...
 
KZ_NO_DISCARD bool isEventForWindow (const XEvent &x11Event) const noexcept
 Tests whether an event is for the window. More...
 
void storeName (const X11Display &display, const char *windowText) noexcept
 Stores a name for a window. More...
 
KZ_NO_DISCARD optional< string > tryFetchName (const X11Display &display) const noexcept
 Tries to get the name of a window. More...
 
 X11Window (const X11Display &display, int x, int y, unsigned int width, unsigned int height)
 Constructor. More...
 
 X11Window (const X11Display &display, windowing::Region windowRegion)
 Constructor. More...
 
 X11Window (Window nativeHandle)
 Constructor. More...
 

Detailed Description

An X11 window.

Since
Kanzi 3.9.8

Constructor & Destructor Documentation

kanzi::x11::X11Window::X11Window ( const X11Display display,
int  x,
int  y,
unsigned int  width,
unsigned int  height 
)
explicit

Constructor.

Parameters
displayX11 display connection to which to attach the window.
xHorizontal position of the top-left corner of the window in screen coordinates.
yVertical position of the top-left corner of the window in screen coordinates.
widthHorizontal extent of the window in screen coordinates.
heightVertical extent of the window in screen coordinates.
kanzi::x11::X11Window::X11Window ( const X11Display display,
windowing::Region  windowRegion 
)
explicit

Constructor.

Parameters
displayX11 display connection to which to attach the window.
windowRegionRegion of the window in screen coordinates.
kanzi::x11::X11Window::X11Window ( Window  nativeHandle)
explicit

Constructor.

Parameters
nativeHandleThe window handle.

Member Function Documentation

void kanzi::x11::X11Window::destroy ( const X11Display display)
noexcept

Destroys a window and all its associated data.

Parameters
displayX11 display connection of the window.
Returns
On success, true, otherwise false.
bool kanzi::x11::X11Window::bringToFront ( const X11Display display)
noexcept

Brings a window in front of all other windows in the z-order.

Parameters
displayX11 display connection of the window.
Returns
On success, true, otherwise false.
KZ_NO_DISCARD Window kanzi::x11::X11Window::getNativeHandle ( ) const
noexcept

Gets the native handle.

Returns
The native handle.
void kanzi::x11::X11Window::storeName ( const X11Display display,
const char *  windowText 
)
noexcept

Stores a name for a window.

Parameters
displayX11 display connection of the window.
windowTextName for the window.
KZ_NO_DISCARD optional<string> kanzi::x11::X11Window::tryFetchName ( const X11Display display) const
noexcept

Tries to get the name of a window.

Parameters
displayX11 display connection of the window.
Return values
nulloptGetting the name of the window failed.
Returns
The name of the window.
KZ_NO_DISCARD bool kanzi::x11::X11Window::isEventForWindow ( const XEvent &  x11Event) const
noexcept

Tests whether an event is for the window.

Parameters
x11EventX11 event to test.
Returns
On success, true, otherwise false.

The documentation for this class was generated from the following file: