Kanzi 3.9.10
kanzi::qnx::QnxContext Class Reference

Class representing a QNX context. More...

#include <kanzi/core.ui/platform/windowing_ng/qnx_screen/qnx_screen_context.hpp>

Inheritance diagram for kanzi::qnx::QnxContext:
[legend]

Public Types

using NativeHandleType
 Alias for underlying native handle type.
 

Public Member Functions

bool flush () noexcept
 Flushes any pending requests.
 
KZ_NO_DISCARD NativeHandleType getNativeHandle () const noexcept
 Gets underlying native handle.
 
QnxContextoperator= (const QnxContext &other)=delete
 Copy assignment operator.
 
QnxContextoperator= (QnxContext &&other) noexcept
 Move assignment operator.
 
 QnxContext () noexcept
 Constructor.
 
 QnxContext (const NativeHandleType nativeHandle) noexcept
 Constructor.
 
 QnxContext (const QnxContext &other)=delete
 Copy constructor.
 
 QnxContext (QnxContext &&other) noexcept
 Move constructor.
 
void swap (QnxContext &other) noexcept
 Swap function.
 
KZ_NO_DISCARD optional< size_t > tryGetDisplayCount () const noexcept
 Tries to get the number of displays associated with the context.
 
KZ_NO_DISCARD QnxEvent tryGetNextEvent (int timeOut) const noexcept
 Gets a next event from the context.
 
KZ_NO_DISCARD optional< vector< QnxDisplay::NativeHandleType > > tryGetQnxDisplayHandles () const noexcept
 Tries to get the native display handles associated with the context.
 
 ~QnxContext ()
 Destructor.
 
- Public Member Functions inherited from kanzi::qnx::QnxPropertyHost< QnxContext >
KZ_NO_DISCARD optional< string > tryGetPropertyCv (size_t stringBufferSize, int propertyName) const noexcept
 Gets QNX property consisting of a string.
 
KZ_NO_DISCARD optional< vector< int > > tryGetPropertyIv (size_t returnValueCount, int propertyName) const noexcept
 Gets QNX property consisting of ints.
 
KZ_NO_DISCARD optional< int > tryGetPropertyIvSingle (int propertyName) const noexcept
 Gets a QNX property consisting of a single int.
 
KZ_NO_DISCARD optional< vector< long long > > tryGetPropertyLlv (size_t returnValueCount, int propertyName) const noexcept
 Gets QNX property consisting of long longs.
 
KZ_NO_DISCARD optional< long long > tryGetPropertyLlvSingle (int propertyName) const noexcept
 Gets a QNX property consisting of a single long long.
 
KZ_NO_DISCARD optional< vector< T > > tryGetPropertyPv (size_t returnValueCount, int propertyName) const noexcept
 Gets QNX property consisting of pointers.
 
KZ_NO_DISCARD optional< T > tryGetPropertyPvSingle (int propertyName) const noexcept
 Gets a QNX property consisting of a single pointer.
 
bool trySetPropertyCv (int propertyName, string_view propertyValue) noexcept
 Sets QNX property consisting of a string.
 
bool trySetPropertyIv (int propertyName, int propertyValue) noexcept
 Sets QNX property consisting of a single int.
 
bool trySetPropertyIv (int propertyName, span< int > propertyValue) noexcept
 Sets QNX property consisting of ints.
 
bool trySetPropertyLlv (int propertyName, long long propertyValue) noexcept
 Sets QNX property consisting of a single long long.
 
bool trySetPropertyLlv (int propertyName, span< long long > propertyValue) noexcept
 Sets QNX property consisting of long longs.
 
bool trySetPropertyPv (int propertyName, span< void * > propertyValue) noexcept
 Sets QNX property consisting of pointers.
 
bool trySetPropertyPv (int propertyName, void *propertyValue) noexcept
 Sets QNX property consisting of a single pointer.
 

Static Public Member Functions

static KZ_NO_DISCARD constexpr QnxPropertyFunctions< NativeHandleTypegetQnxPropertyFunctions () noexcept
 Creates QNX property functions for this resource.
 
static KZ_NO_DISCARD QnxContext tryCreate (int contextFlags) noexcept
 Tries to create a QNX context.
 

Detailed Description

Class representing a QNX context.

Since
Kanzi 3.9.10 changed to use QnxPropertyHost interface.

Member Typedef Documentation

◆ NativeHandleType

Alias for underlying native handle type.

Since
Kanzi 3.9.10

Constructor & Destructor Documentation

◆ QnxContext() [1/4]

kanzi::qnx::QnxContext::QnxContext ( )
explicitnoexcept

Constructor.

Since
3.9.10

◆ QnxContext() [2/4]

kanzi::qnx::QnxContext::QnxContext ( const NativeHandleType nativeHandle)
explicitnoexcept

Constructor.

Parameters
nativeHandleNative handle.
Since
3.9.10 marked as noexcept.

◆ ~QnxContext()

kanzi::qnx::QnxContext::~QnxContext ( )

Destructor.

◆ QnxContext() [3/4]

kanzi::qnx::QnxContext::QnxContext ( const QnxContext & other)
delete

Copy constructor.

◆ QnxContext() [4/4]

kanzi::qnx::QnxContext::QnxContext ( QnxContext && other)
noexcept

Move constructor.

Since
Kanzi 3.9.10

Member Function Documentation

◆ tryCreate()

static KZ_NO_DISCARD QnxContext kanzi::qnx::QnxContext::tryCreate ( int contextFlags)
staticnoexcept

Tries to create a QNX context.

Parameters
contextFlagsQNX Screen context bit flags.
Returns
The created object. If error occurred, empty.
Since
Kanzi 3.9.10.

◆ operator=() [1/2]

QnxContext & kanzi::qnx::QnxContext::operator= ( const QnxContext & other)
delete

Copy assignment operator.

◆ operator=() [2/2]

QnxContext & kanzi::qnx::QnxContext::operator= ( QnxContext && other)
noexcept

Move assignment operator.

Since
Kanzi 3.9.10

◆ swap()

void kanzi::qnx::QnxContext::swap ( QnxContext & other)
noexcept

Swap function.

Parameters
otherThe object with which to swap.
Since
Kanzi 3.9.10

◆ getNativeHandle()

KZ_NO_DISCARD NativeHandleType kanzi::qnx::QnxContext::getNativeHandle ( ) const
noexcept

Gets underlying native handle.

Returns
Native handle.

◆ tryGetNextEvent()

KZ_NO_DISCARD QnxEvent kanzi::qnx::QnxContext::tryGetNextEvent ( int timeOut) const
noexcept

Gets a next event from the context.

Parameters
timeOutMaximum time (in nanoseconds) to wait for an event to occur. -1 indicates that the call will block until an event is ready.
Returns
QNX event.
Since
3.9.10 returns a QnxEvent.

◆ tryGetDisplayCount()

KZ_NO_DISCARD optional< size_t > kanzi::qnx::QnxContext::tryGetDisplayCount ( ) const
noexcept

Tries to get the number of displays associated with the context.

Return values
nulloptTrying to get the number of displays has failed.
Returns
Display count.

◆ tryGetQnxDisplayHandles()

KZ_NO_DISCARD optional< vector< QnxDisplay::NativeHandleType > > kanzi::qnx::QnxContext::tryGetQnxDisplayHandles ( ) const
noexcept

Tries to get the native display handles associated with the context.

Return values
nulloptTrying to get the displays has failed.
Returns
Displays.

◆ flush()

bool kanzi::qnx::QnxContext::flush ( )
noexcept

Flushes any pending requests.

Returns
True on success, false on failure.

◆ getQnxPropertyFunctions()

static KZ_NO_DISCARD constexpr QnxPropertyFunctions< NativeHandleType > kanzi::qnx::QnxContext::getQnxPropertyFunctions ( )
inlinestaticconstexprnoexcept

Creates QNX property functions for this resource.

Returns
The QnxPropertyFunctions struct for this resource.
Since
Kanzi 3.9.10

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