Kanzi 3.9.10
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
 Type alias for an X11 unique pointer.
 

Enumerations

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

Typedef Documentation

◆ X11UniquePtr

Type alias for an X11 unique pointer.

Enumeration Type Documentation

◆ X11WMAction

An X11 window manager action.

Enumerator
Remove 

Removes or unsets a property.

Add 

Adds or sets a property.

Toggle 

Toggles a property.

Function Documentation

◆ x11KeyToLogicalKey()

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

◆ x11ModifierToKanziModifier()

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

◆ x11KeyToKanziModifier()

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

◆ x11ButtonToKanziButton()

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

◆ makeXClientEvent()

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.

◆ makeX11UniquePtr()

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.

◆ moveWindow()

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.

◆ showWindow()

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.

◆ hideWindow()

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.

◆ minimizeWindow()

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.

◆ selectWindowInputEvents()

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.

◆ setWindowRegionHints()

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.

◆ resizeClientArea()

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.

◆ resizeWindow()

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.

◆ tryGetWindowSize()

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.

◆ tryGetWindowSizeU()

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.

◆ tryGetWindowPositionX()

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.

◆ tryGetWindowPositionY()

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.