Kanzi 3.9.10
kanzi::qnx::QnxWindow Class Reference

Class representing a QNX window. More...

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

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

Public Types

using NativeHandleType
 Alias for underlying native handle type.
 

Public Member Functions

bool createBuffers (int bufferCount) noexcept
 Creates buffers for this window.
 
KZ_NO_DISCARD optional< windowing::SizegetBufferSize () const noexcept
 Tries to get the buffer size for this window.
 
KZ_NO_DISCARD NativeHandleType getNativeHandle () const noexcept
 Gets underlying native handle.
 
optional< intgetUsageFlags () noexcept
 Gets usage flags for this window.
 
bool hide () noexcept
 Hides this window.
 
QnxWindowoperator= (const QnxWindow &other)=delete
 Copy assignment operator.
 
QnxWindowoperator= (QnxWindow &&other) noexcept
 Move assignment operator.
 
 QnxWindow () noexcept
 Constructor.
 
 QnxWindow (const NativeHandleType nativeHandle) noexcept
 Constructor.
 
 QnxWindow (const QnxWindow &other)=delete
 Copy constructor.
 
 QnxWindow (QnxWindow &&other) noexcept
 Move constructor.
 
bool setBufferSize (windowing::Size bufferSize) noexcept
 Sets buffer size for this window.
 
bool setPipelineID (int id) noexcept
 Sets screen pipeline ID for this window.
 
bool setPosition (windowing::Position windowPosition) noexcept
 Sets position for this window.
 
bool setSize (windowing::Size windowSize) noexcept
 Sets size for this window.
 
bool setSwapInterval (int interval) noexcept
 Sets minimum number of displayed video frames before a buffer swap for this window.
 
bool setTransparency (int level) noexcept
 Sets transparency level for this window.
 
bool setUsageFlags (int usageFlags) noexcept
 Sets usage flags for this window.
 
bool setZOrder (int zorder) noexcept
 Sets z-order for this window.
 
bool show () noexcept
 Shows this window.
 
void swap (QnxWindow &other) noexcept
 Swap function.
 
KZ_NO_DISCARD optional< windowing::PositiontryGetPosition () const noexcept
 Tries to get the x and y screen coordinates for this window.
 
KZ_NO_DISCARD optional< string > tryGetPropertyIDString (unsigned int bufferSize) const noexcept
 Tries to get the current ID string for this window.
 
KZ_NO_DISCARD optional< void * > tryGetPropertyUserHandle () const noexcept
 Gets user data for this window.
 
KZ_NO_DISCARD optional< windowing::SizetryGetSize () const noexcept
 Tries to get the size for this window.
 
bool trySetPropertyDisplay (const QnxDisplay &qnxDisplay) noexcept
 Sets display property for this window.
 
bool trySetPropertyIDString (string_view propertyString) noexcept
 Sets a property ID string for this window.
 
bool trySetPropertyUserHandle (void *userHandle) noexcept
 Sets user data for this window.
 
 ~QnxWindow ()
 Destructor.
 
- Public Member Functions inherited from kanzi::qnx::QnxPropertyHost< QnxWindow >
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 QnxWindow tryCreate (const QnxContext &qnxContext) noexcept
 Tries to create a QNX window.
 
static KZ_NO_DISCARD QnxWindow tryCreate (QnxContext &qnxContext, const QnxDisplay &qnxDisplay, windowing::Size windowSize, unsigned int bufferCount, int usageFlags, optional< int > pipelineID) noexcept
 Tries to create a QNX window.
 

Detailed Description

Class representing a QNX window.

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

◆ QnxWindow() [1/4]

kanzi::qnx::QnxWindow::QnxWindow ( )
explicitnoexcept

Constructor.

◆ QnxWindow() [2/4]

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

Constructor.

Parameters
nativeHandleNative handle.
Since
Kanzi 3.9.10 marked as noexcept.

◆ ~QnxWindow()

kanzi::qnx::QnxWindow::~QnxWindow ( )

Destructor.

◆ QnxWindow() [3/4]

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

Copy constructor.

◆ QnxWindow() [4/4]

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

Move constructor.

Member Function Documentation

◆ tryCreate() [1/2]

static KZ_NO_DISCARD QnxWindow kanzi::qnx::QnxWindow::tryCreate ( QnxContext & qnxContext,
const QnxDisplay & qnxDisplay,
windowing::Size windowSize,
unsigned int bufferCount,
int usageFlags,
optional< int > pipelineID )
staticnoexcept

Tries to create a QNX window.

Parameters
qnxContextQNX context.
qnxDisplayQNX display.
windowSizeSize of the window and the window buffer.
bufferCountAmount of buffers to create for a window.
usageFlagsUsage flag bit mask to use for a window.
pipelineIDQNX Screen pipeline ID
Returns
The created object. If error occurred, empty.
Since
Kanzi 3.9.10 returns a QnxWindow.

◆ tryCreate() [2/2]

static KZ_NO_DISCARD QnxWindow kanzi::qnx::QnxWindow::tryCreate ( const QnxContext & qnxContext)
staticnoexcept

Tries to create a QNX window.

Parameters
qnxContextQNX context.
Returns
The created object. If error occurred, empty.
Since
Kanzi 3.9.10.

◆ operator=() [1/2]

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

Copy assignment operator.

◆ operator=() [2/2]

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

Move assignment operator.

◆ swap()

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

Swap function.

Parameters
otherThe object with which to swap.
Since
Kanzi 3.9.10

◆ getNativeHandle()

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

Gets underlying native handle.

Returns
Native handle.

◆ createBuffers()

bool kanzi::qnx::QnxWindow::createBuffers ( int bufferCount)
noexcept

Creates buffers for this window.

Parameters
bufferCountAmount of buffers to create.
Returns
True on success, false on failure.

◆ setBufferSize()

bool kanzi::qnx::QnxWindow::setBufferSize ( windowing::Size bufferSize)
noexcept

Sets buffer size for this window.

Parameters
bufferSizeBuffer size to set in pixels.
Returns
True on success, false on failure.

◆ getBufferSize()

KZ_NO_DISCARD optional< windowing::Size > kanzi::qnx::QnxWindow::getBufferSize ( ) const
noexcept

Tries to get the buffer size for this window.

Return values
nulloptGetting the buffer size failed.
Returns
Buffer size in pixels.

◆ setUsageFlags()

bool kanzi::qnx::QnxWindow::setUsageFlags ( int usageFlags)
noexcept

Sets usage flags for this window.

Parameters
usageFlagsUsage flag bit mask to use.
Returns
True on success, false on failure.

◆ getUsageFlags()

optional< int > kanzi::qnx::QnxWindow::getUsageFlags ( )
noexcept

Gets usage flags for this window.

Return values
nulloptFailed to get usage flags.
Returns
Usage flags.
Since
Kanzi 3.9.10 changed to return the value instead of using an out parameter.

◆ setZOrder()

bool kanzi::qnx::QnxWindow::setZOrder ( int zorder)
noexcept

Sets z-order for this window.

Parameters
zorderZ order to set.
Returns
True on success, false on failure.

◆ show()

bool kanzi::qnx::QnxWindow::show ( )
noexcept

Shows this window.

Returns
True on success, false on failure.

◆ hide()

bool kanzi::qnx::QnxWindow::hide ( )
noexcept

Hides this window.

Returns
True on success, false on failure.

◆ setSize()

bool kanzi::qnx::QnxWindow::setSize ( windowing::Size windowSize)
noexcept

Sets size for this window.

Parameters
windowSizeWindow size to set in pixels.
Returns
True on success, false on failure.

◆ setPosition()

bool kanzi::qnx::QnxWindow::setPosition ( windowing::Position windowPosition)
noexcept

Sets position for this window.

Child window and embedded window positions are relative to their parent window positions.

Parameters
windowPositionWindow position to set in pixels.
Returns
True on success, false on failure.

◆ setTransparency()

bool kanzi::qnx::QnxWindow::setTransparency ( int level)
noexcept

Sets transparency level for this window.

Parameters
levelScreen transparency level to set.
Returns
True on success, false on failure.

◆ tryGetSize()

KZ_NO_DISCARD optional< windowing::Size > kanzi::qnx::QnxWindow::tryGetSize ( ) const
noexcept

Tries to get the size for this window.

Return values
nulloptGetting the size failed.
Returns
Window size in pixels.

◆ tryGetPosition()

KZ_NO_DISCARD optional< windowing::Position > kanzi::qnx::QnxWindow::tryGetPosition ( ) const
noexcept

Tries to get the x and y screen coordinates for this window.

Return values
nulloptGetting the position failed.
Returns
Window position.

◆ trySetPropertyUserHandle()

bool kanzi::qnx::QnxWindow::trySetPropertyUserHandle ( void * userHandle)
noexcept

Sets user data for this window.

Parameters
userHandleUser data to set.
Returns
True on success, false on failure.

◆ tryGetPropertyUserHandle()

KZ_NO_DISCARD optional< void * > kanzi::qnx::QnxWindow::tryGetPropertyUserHandle ( ) const
noexcept

Gets user data for this window.

Return values
nulloptGetting user data failed.
Returns
User data pointer.

◆ tryGetPropertyIDString()

KZ_NO_DISCARD optional< string > kanzi::qnx::QnxWindow::tryGetPropertyIDString ( unsigned int bufferSize) const
noexcept

Tries to get the current ID string for this window.

Parameters
bufferSizeMaximum buffer size for property ID string.
Return values
nulloptGetting the property ID string failed.
Returns
ID string, clamped to bufferSize.

◆ trySetPropertyIDString()

bool kanzi::qnx::QnxWindow::trySetPropertyIDString ( string_view propertyString)
noexcept

Sets a property ID string for this window.

Parameters
propertyStringProperty name to set.
Returns
True on success, false on failure.

◆ trySetPropertyDisplay()

bool kanzi::qnx::QnxWindow::trySetPropertyDisplay ( const QnxDisplay & qnxDisplay)
noexcept

Sets display property for this window.

Parameters
qnxDisplayQNX display to use.
Returns
True on success, false on failure.

◆ setPipelineID()

bool kanzi::qnx::QnxWindow::setPipelineID ( int id)
noexcept

Sets screen pipeline ID for this window.

Note
Whenever pipeline ID is set manually, SCREEN_USAGE_OVERLAY flag must also be set in SCREEN_PROPERTY_USAGE. Non-member function setWindowPipelineID does this in addition to setting the pipeline ID. Use it instead if unsure.
Parameters
idScreen pipeline id to set.
Returns
True on success, false on failure.

◆ setSwapInterval()

bool kanzi::qnx::QnxWindow::setSwapInterval ( int interval)
noexcept

Sets minimum number of displayed video frames before a buffer swap for this window.

Parameters
intervalMinimum number of video frames to wait before buffer swap.
Returns
True on success, false on failure.

◆ getQnxPropertyFunctions()

static KZ_NO_DISCARD constexpr QnxPropertyFunctions< NativeHandleType > kanzi::qnx::QnxWindow::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: