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

Detailed Description

An X11 window.

Since
Kanzi 3.9.8

Constructor & Destructor Documentation

◆ X11Window() [1/3]

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.

◆ X11Window() [2/3]

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.

◆ X11Window() [3/3]

kanzi::x11::X11Window::X11Window ( Window nativeHandle)
explicit

Constructor.

Parameters
nativeHandleThe window handle.

Member Function Documentation

◆ destroy()

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.

◆ bringToFront()

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.

◆ getNativeHandle()

KZ_NO_DISCARD Window kanzi::x11::X11Window::getNativeHandle ( ) const
noexcept

Gets the native handle.

Returns
The native handle.

◆ storeName()

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.

◆ tryFetchName()

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.

◆ isEventForWindow()

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: