Kanzi  3.9.5
Kanzi Engine API
kanzi::qnx::QnxWindow Class Reference

Class representing a Qnx window. More...

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

Public Member Functions

bool createBuffers (int bufferCount) noexcept
 Creates buffers for this window. More...
 
KZ_NO_DISCARD optional< windowing::SizegetBufferSize () const noexcept
 Tries to get the buffer size for this window. More...
 
KZ_NO_DISCARD QnxScreenWindowHandleType getNativeHandle () const noexcept
 Gets Qnx window handle. More...
 
bool getUsageFlags (int &out_usageFlags) noexcept
 Gets usage flags for this window. More...
 
bool hide () noexcept
 Hides this window. More...
 
QnxWindowoperator= (QnxWindow &&qnxWindow) noexcept
 Move assignment. More...
 
 QnxWindow (const QnxContext &qnxContext)
 Constructor. More...
 
 QnxWindow (const QnxScreenWindowHandleType windowHandle)
 Constructor. More...
 
 QnxWindow (QnxWindow &&qnxWindow) noexcept
 Move constructor. More...
 
bool setBufferSize (windowing::Size bufferSize) noexcept
 Sets buffer size for this window. More...
 
bool setPipelineID (int id) noexcept
 Sets screen pipeline ID for this window. More...
 
bool setPosition (windowing::Position windowPosition) noexcept
 Sets position for this window. More...
 
bool setPropertyDisplay (const QnxDisplay &qnxDisplay) noexcept
 Sets display property for this window. More...
 
bool setPropertyIDString (string_view propertyString) noexcept
 Sets a property ID string for this window. More...
 
bool setPropertyUserHandle (void *userHandle) noexcept
 Sets user data for this window. More...
 
bool setSize (windowing::Size windowSize) noexcept
 Sets size for this window. More...
 
bool setSwapInterval (int interval) noexcept
 Sets minimum number of displayed video frames before a buffer swap for this window. More...
 
bool setTransparency (int level) noexcept
 Sets transparency level for this window. More...
 
bool setUsageFlags (int usageFlags) noexcept
 Sets usage flags for this window. More...
 
bool setZOrder (int zorder) noexcept
 Sets z-order for this window. More...
 
bool show () noexcept
 Shows this window. More...
 
KZ_NO_DISCARD optional< windowing::PositiontryGetPosition () const noexcept
 Tries to get the x and y screen coordinates for this window. More...
 
KZ_NO_DISCARD optional< string > tryGetPropertyIDString (unsigned int bufferSize) const noexcept
 Tries to get the current ID string for this window. More...
 
KZ_NO_DISCARD optional< void * > tryGetPropertyUserHandle () const noexcept
 Gets user data for this window. More...
 
KZ_NO_DISCARD optional< windowing::SizetryGetSize () const noexcept
 Tries to get the size for this window. More...
 
 ~QnxWindow ()
 Destructor. More...
 

Static Public Member Functions

static KZ_NO_DISCARD optional< QnxWindowtryCreate (QnxContext &qnxContext, const QnxDisplay &qnxDisplay, windowing::Size windowSize, unsigned int bufferCount, int usageFlags, optional< int > pipelineID) noexcept
 Tries to create a Qnx window. More...
 

Detailed Description

Class representing a Qnx window.

Constructor & Destructor Documentation

◆ QnxWindow() [1/3]

kanzi::qnx::QnxWindow::QnxWindow ( const QnxContext qnxContext)
explicit

Constructor.

Parameters
qnxContextQnx context.

◆ QnxWindow() [2/3]

kanzi::qnx::QnxWindow::QnxWindow ( const QnxScreenWindowHandleType  windowHandle)
explicit

Constructor.

Parameters
windowHandleQnx window handle.
Precondition
windowHandle must be a valid window handle.

◆ ~QnxWindow()

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

Destructor.

◆ QnxWindow() [3/3]

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

Move constructor.

Member Function Documentation

◆ tryCreate()

static KZ_NO_DISCARD optional<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
Return values
nulloptWindow creation failed.
Returns
The newly created Qnx window.

◆ operator=()

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

Move assignment.

◆ 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()

bool kanzi::qnx::QnxWindow::getUsageFlags ( int &  out_usageFlags)
noexcept

Gets usage flags for this window.

Parameters
out_usageFlagsReference to output integer for the usage flags.
Returns
True on success, false on failure.

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

◆ setPropertyUserHandle()

bool kanzi::qnx::QnxWindow::setPropertyUserHandle ( 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.

◆ setPropertyIDString()

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

Sets a property ID string for this window.

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

◆ setPropertyDisplay()

bool kanzi::qnx::QnxWindow::setPropertyDisplay ( 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.

◆ getNativeHandle()

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

Gets Qnx window handle.

Returns
Qnx window handle.

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