Kanzi  3.9.8
Kanzi Engine C++ API
kanzi::x11 Namespace Reference

Classes

class  DefaultX11EGLGraphicsOutput
 Default X11 EGL graphics output. More...
 
struct  DefaultX11EGLGraphicsOutputProperties
 Default X11 EGL graphics output properties. More...
 
struct  X11Deleter
 An X11 deleter functor. More...
 
class  X11Display
 An X11 display. More...
 
class  X11Window
 An X11 window. More...
 
struct  XClientMessageData
 X client message data. More...
 

Typedefs

template<typename T >
using X11UniquePtr = unique_ptr< T, X11Deleter >
 Type alias for an X11 unique pointer. More...
 

Enumerations

enum  X11WMAction : long { X11WMAction::Remove, X11WMAction::Add, X11WMAction::Toggle }
 An X11 window manager action. More...
 

Functions

void hideWindow (const X11Display &display, X11Window &window) noexcept
 Makes a window invisible and inactive on the current display monitor. More...
 
template<typename T >
KZ_NO_DISCARD X11UniquePtr< T > makeX11UniquePtr (T *p) noexcept
 Gets a unique pointer to a type of T. More...
 
KZ_NO_DISCARD::XEvent makeXClientEvent (const XClientMessageData &clientMessageData, Atom clientMessageType, const X11Window &targetWindow) noexcept
 Makes X client event for X11 server. More...
 
bool minimizeWindow (const X11Display &display, X11Window &window) noexcept
 Minimizes a window to the taskbar and makes it inactive on the current display monitor. More...
 
void moveWindow (const X11Display &display, X11Window &window, int x, int y) noexcept
 Moves a window to a given position. More...
 
void resizeClientArea (const X11Display &display, X11Window &window, unsigned int width, unsigned int height) noexcept
 Resizes the client-area of a window. More...
 
void resizeWindow (const X11Display &display, X11Window &window, unsigned int width, unsigned int height) noexcept
 Resizes a window. More...
 
void selectWindowInputEvents (const X11Display &display, X11Window &window, long eventBitMask) noexcept
 Selects which input events to receive for a window. More...
 
bool setWindowRegionHints (const X11Display &display, const X11Window &window, windowing::Region windowRegion) noexcept
 Sets hints for a window to help the X11 compositor. More...
 
void showWindow (const X11Display &display, X11Window &window) noexcept
 Sets a window to be visible and active on the current display monitor. More...
 
KZ_NO_DISCARD optional< int > tryGetWindowPositionX (const X11Display &display, const X11Window &window) noexcept
 Tries to get the x position of a window. More...
 
KZ_NO_DISCARD optional< int > tryGetWindowPositionY (const X11Display &display, const X11Window &window) noexcept
 Tries to get the y position of a window. More...
 
KZ_NO_DISCARD optional< windowing::SizetryGetWindowSize (const X11Display &display, const X11Window &window) noexcept
 Tries to get the size of a window. More...
 
KZ_NO_DISCARD optional< windowing::SizeUtryGetWindowSizeU (const X11Display &display, const X11Window &window) noexcept
 Tries to get the unsigned size of a window. More...
 
KZ_NO_DISCARD PointerButton x11ButtonToKanziButton (unsigned int x11Button) noexcept
 Maps a native X11 button to a logical button used by Kanzi. More...
 
KZ_NO_DISCARD KeyModifier x11KeyToKanziModifier (unsigned int x11Key) noexcept
 Maps a native X11 key to a key modifier used by Kanzi. More...
 
KZ_NO_DISCARD LogicalKey x11KeyToLogicalKey (unsigned int x11Key) noexcept
 Maps a native X11 key to a logical key used by Kanzi. More...
 
KZ_NO_DISCARD KeyModifier x11ModifierToKanziModifier (unsigned int x11Modifier) noexcept
 Maps a native X11 key modifier to a key modifier used by Kanzi. More...
 

Typedef Documentation

template<typename T >
using kanzi::x11::X11UniquePtr = typedef unique_ptr<T, X11Deleter>

Type alias for an X11 unique pointer.

Enumeration Type Documentation

enum kanzi::x11::X11WMAction : long
strong

An X11 window manager action.

Enumerator
Remove 

Removes or unsets a property.

Add 

Adds or sets a property.

Toggle 

Toggles a property.

Function Documentation

KZ_NO_DISCARD LogicalKey kanzi::x11::x11KeyToLogicalKey ( unsigned int  x11Key)
noexcept

Maps a native X11 key to a logical key used by Kanzi.

Parameters
x11KeyThe native X11 key to map.
Returns
Kanzi logical key.
Since
Kanzi 3.9.8
KZ_NO_DISCARD KeyModifier kanzi::x11::x11ModifierToKanziModifier ( unsigned int  x11Modifier)
noexcept

Maps a native X11 key modifier to a key modifier used by Kanzi.

Parameters
x11ModifierThe native X11 key modifier to map.
Returns
Kanzi key modifier.
Since
Kanzi 3.9.8
KZ_NO_DISCARD KeyModifier kanzi::x11::x11KeyToKanziModifier ( unsigned int  x11Key)
noexcept

Maps a native X11 key to a key modifier used by Kanzi.

Parameters
x11KeyThe native X11 key to map.
Returns
Kanzi key modifier.
Since
Kanzi 3.9.8
KZ_NO_DISCARD PointerButton kanzi::x11::x11ButtonToKanziButton ( unsigned int  x11Button)
noexcept

Maps a native X11 button to a logical button used by Kanzi.

Parameters
x11ButtonThe native X11 button to map.
Returns
Kanzi logical button.
Since
Kanzi 3.9.8
KZ_NO_DISCARD ::XEvent kanzi::x11::makeXClientEvent ( const XClientMessageData clientMessageData,
Atom  clientMessageType,
const X11Window targetWindow 
)
noexcept

Makes X client event for X11 server.

Parameters
clientMessageDataThe raw message data to send to the X11 server.
clientMessageTypeThe type of message to send to the X11 server.
targetWindowThe X11 window to receive the event.
Returns
X client event.
template<typename T >
KZ_NO_DISCARD X11UniquePtr<T> kanzi::x11::makeX11UniquePtr ( T *  p)
inlinenoexcept

Gets a unique pointer to a type of T.

Parameters
pThe pointer of type T to which to get the unique pointer.
Returns
The unique pointer.
void kanzi::x11::moveWindow ( const X11Display display,
X11Window window,
int  x,
int  y 
)
noexcept

Moves a window to a given position.

Parameters
displayX11 display connection of the window.
windowWindow to move.
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.
void kanzi::x11::showWindow ( const X11Display display,
X11Window window 
)
noexcept

Sets a window to be visible and active on the current display monitor.

Parameters
displayX11 display connection of the window.
windowWindow to show.
void kanzi::x11::hideWindow ( const X11Display display,
X11Window window 
)
noexcept

Makes a window invisible and inactive on the current display monitor.

Parameters
displayX11 display connection of the window.
windowWindow to hide.
bool kanzi::x11::minimizeWindow ( const X11Display display,
X11Window window 
)
noexcept

Minimizes a window to the taskbar and makes it inactive on the current display monitor.

Parameters
displayX11 display connection of the window.
windowWindow to minimize.
Returns
On success, true, otherwise false.
void kanzi::x11::selectWindowInputEvents ( const X11Display display,
X11Window window,
long  eventBitMask 
)
noexcept

Selects which input events to receive for a window.

Parameters
displayX11 display connection of the window.
windowWindow for which to receive input events.
eventBitMaskInput event bits.
bool kanzi::x11::setWindowRegionHints ( const X11Display display,
const X11Window window,
windowing::Region  windowRegion 
)
noexcept

Sets hints for a window to help the X11 compositor.

Parameters
displayX11 display connection of the window.
windowWindow for which to set the hints.
windowRegionWindow region of the window.
Returns
On success, true, otherwise false.
void kanzi::x11::resizeClientArea ( const X11Display display,
X11Window window,
unsigned int  width,
unsigned int  height 
)
noexcept

Resizes the client-area of a window.

Parameters
displayX11 display connection of the window.
windowWindow whose client-area to resize.
widthWidth to which to resize.
heightHeight to which to resize.
void kanzi::x11::resizeWindow ( const X11Display display,
X11Window window,
unsigned int  width,
unsigned int  height 
)
noexcept

Resizes a window.

Parameters
displayX11 display connection of the window.
windowWindow to resize.
widthWidth to which to resize.
heightHeight to which to resize.
KZ_NO_DISCARD optional<windowing::Size> kanzi::x11::tryGetWindowSize ( const X11Display display,
const X11Window window 
)
noexcept

Tries to get the size of a window.

Parameters
displayX11 display connection of the window.
windowWindow to get the size for.
Return values
nulloptGetting the size of the window failed.
Returns
The size of the window.
KZ_NO_DISCARD optional<windowing::SizeU> kanzi::x11::tryGetWindowSizeU ( const X11Display display,
const X11Window window 
)
noexcept

Tries to get the unsigned size of a window.

Parameters
displayX11 display connection of the window.
windowWindow for which to get the unsigned size.
Return values
nulloptGetting the unsigned size of the window failed.
Returns
The unsigned size of the window.
KZ_NO_DISCARD optional<int> kanzi::x11::tryGetWindowPositionX ( const X11Display display,
const X11Window window 
)
noexcept

Tries to get the x position of a window.

Parameters
displayX11 display connection of the window.
windowWindow for which to get the x position.
Return values
nulloptGetting the x position of the window failed.
Returns
The x position of the window.
KZ_NO_DISCARD optional<int> kanzi::x11::tryGetWindowPositionY ( const X11Display display,
const X11Window window 
)
noexcept

Tries to get the y position of a window.

Parameters
displayX11 display connection of the window.
windowWindow for which to get the y position.
Return values
nulloptGetting the y position of the window failed.
Returns
The y position of the window.