Kanzi  3.9.4
Kanzi Engine API
kanzi::qnx::QnxContext Class Reference

Class representing a Qnx context. More...

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

Public Member Functions

bool flush () noexcept
 Flushes any pending requests. More...
 
KZ_NO_DISCARD QnxScreenContextHandleType getNativeHandle () const noexcept
 Gets Qnx context handle. More...
 
 QnxContext (int contextFlags)
 Constructor. More...
 
 QnxContext (const QnxScreenContextHandleType contextHandle)
 Constructor. More...
 
KZ_NO_DISCARD optional< size_t > tryGetDisplayCount () const noexcept
 Tries to get the number of displays associated with the context. More...
 
KZ_NO_DISCARD optional< QnxEventtryGetNextEvent (int timeOut) const noexcept
 Gets a next event from the context. More...
 
KZ_NO_DISCARD optional< vector< QnxScreenDisplayHandleType > > tryGetQnxDisplayHandles () const noexcept
 Tries to get the native display handles associated with the context. More...
 
 ~QnxContext ()
 Destructor. More...
 

Detailed Description

Class representing a Qnx context.

Constructor & Destructor Documentation

◆ QnxContext() [1/2]

kanzi::qnx::QnxContext::QnxContext ( int  contextFlags)
explicit

Constructor.

Parameters
contextFlagsQnx screen context bit flags.

◆ QnxContext() [2/2]

kanzi::qnx::QnxContext::QnxContext ( const QnxScreenContextHandleType  contextHandle)
explicit

Constructor.

Parameters
contextHandleQnx context handle.
Precondition
contextHandle must be a valid context handle.

◆ ~QnxContext()

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

Destructor.

Member Function Documentation

◆ tryGetNextEvent()

KZ_NO_DISCARD optional<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.
Return values
nulloptTrying to get an event has failed.
Returns
Qnx event.

◆ 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<QnxScreenDisplayHandleType> > 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.

◆ getNativeHandle()

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

Gets Qnx context handle.

Returns
Qnx context handle.

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