Kanzi  3.9.6
Kanzi Engine API
kanzi::qnx::DefaultQnxEGLGraphicsOutput Class Reference

Class representing a default QNX EGL graphics output. More...

#include <kanzi/core.ui/platform/graphics_output/qnx_egl/default_qnx_egl_graphics_output.hpp>

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

Public Member Functions

bool bringToFront () noexcept override
 Schedules raising the window above other windows. More...
 
KZ_NO_DISCARD optional< void * > createImage (int target, void *data, int *attributes) noexcept override
 Function for creating native image object, which can be shared between client APIs. More...
 
 DefaultQnxEGLGraphicsOutput (const DefaultQnxEGLGraphicsOutputProperties &properties)
 Constructor. More...
 
bool destroyImage (void *image) noexcept override
 Destroys an EGL image. More...
 
bool flushContext () noexcept
 Flush any pending Qnx screen requests to the compositor. More...
 
void gatherEvents (EventQueue &queue) override
 Amends the given event queue with events received so far. More...
 
optional< SurfaceColorSpacegetColorSpace () const noexcept override
 Gets the color space used by the associated graphics context. More...
 
optional< GraphicsContextAPIgetGraphicsContextAPI () const noexcept override
 Gets the API used by the associated graphics context. More...
 
KZ_NO_DISCARD optional< void * > getNativeContextHandle () const noexcept override
 Gets associated native GL context handle. More...
 
KZ_NO_DISCARD optional< void * > getNativeDisplayHandle () const noexcept override
 Gets associated native GL display handle. More...
 
optional< NativeEventHandlegetNativeEventHandle () const noexcept override
 Returns a waitable event handle for this event source, if available. More...
 
KZ_NO_DISCARD optional< void * > getNativeSurfaceHandle () const noexcept override
 Gets associated native GL surface handle. More...
 
optional< NativeWindowHandle > getNativeWindowHandle () const noexcept override
 Gets the associated window handle. More...
 
KZ_NO_DISCARD GLProcPointer getProcAddress (string_view functionName) override
 Retrieves pointer to GL function. More...
 
optional< SurfaceClientAPIgetSurfaceClientAPI () const noexcept override
 Gets the type of the associated graphics surface. More...
 
Matrix4x4 getTargetTransformation () const noexcept override
 Returns the target transformation. More...
 
optional< unsigned int > getWindowHeight () const noexcept override
 Returns the active window height. More...
 
optional< int > getWindowPositionX () const noexcept override
 Returns the window x position. More...
 
optional< int > getWindowPositionY () const noexcept override
 Returns the window y position. More...
 
optional< string > getWindowTitle () const noexcept override
 Gets title for the active window. More...
 
optional< unsigned int > getWindowWidth () const noexcept override
 Returns the active window width. More...
 
bool hideWindow () noexcept override
 Schedules making the window invisible. More...
 
void logWindowPosition () const noexcept
 Prints the active window position to log. More...
 
void logWindowSize () const noexcept
 Prints the active window size to log. More...
 
bool makeCurrent () noexcept override
 Make the current EGL thread active. More...
 
bool makeFullscreen () noexcept override
 Schedules making the window fullscreen. More...
 
bool makeMaximized () noexcept override
 Schedules maximizing the window. More...
 
bool makeMinimized () noexcept override
 Schedules minimizing the window. More...
 
bool makeRegular () noexcept override
 Schedules making the window regular. More...
 
bool makeWindowOpaque () noexcept
 Makes the active window fully opaque. More...
 
bool moveWindow (int positionX, int positionY) noexcept override
 Schedules a window move. More...
 
bool releaseCurrent () noexcept override
 Make the current EGL thread inactive. More...
 
bool resize (unsigned int width, unsigned int height) noexcept override
 Schedules a resize of the target layout area. More...
 
bool resizeWindow (unsigned int width, unsigned int height) noexcept override
 Schedules a resize of the active window. More...
 
bool setWindowTitle (string_view title) noexcept override
 Sets a title for the active window. More...
 
bool setWindowZOrder (int zorder) noexcept
 Sets the z ordering for the active window related to all other windows currently visible. More...
 
bool showWindow () noexcept override
 Schedules making the window visible. More...
 
bool swapBuffers () override
 Posts rendering results. More...
 
bool swapInterval (int interval) override
 Sets minimum number of displayed video frames before a buffer swap. More...
 
 ~DefaultQnxEGLGraphicsOutput ()
 Destructor. More...
 
- Public Member Functions inherited from kanzi::GraphicsOutput
KZ_NO_DISCARD Vector2 getDpi () const noexcept
 Returns the resolution of the target coordinate system in dots per inch. More...
 
KZ_NO_DISCARD unsigned int getHeight () const noexcept
 Returns the height of layout area in the target coordinate system. More...
 
KZ_NO_DISCARD unsigned int getWidth () const noexcept
 Returns the width of layout area in the target coordinate system. More...
 
virtual ~GraphicsOutput ()=default
 Destructor. More...
 
- Public Member Functions inherited from kanzi::EventSource
virtual ~EventSource ()=default
 Destructor. More...
 
- Public Member Functions inherited from kanzi::GLGraphicsOutput
virtual ~GLGraphicsOutput ()=default
 Destructor. More...
 
- Public Member Functions inherited from kanzi::WindowedGraphicsOutput
virtual ~WindowedGraphicsOutput ()=default
 Destructor. More...
 

Protected Member Functions

void setTargetTransformation (Matrix4x4 targetTransformation) noexcept
 Sets the target transformation. More...
 
void updateCachedValues (unsigned int width, unsigned int height) noexcept
 Updates all cached values from given layout size. More...
 
- Protected Member Functions inherited from kanzi::GraphicsOutput
void updateDpi (Vector2 dpi)
 Updates the target layout area resolution. More...
 
void updateSize (unsigned int width, unsigned int height)
 Updates the target layout area size. More...
 

Additional Inherited Members

- Public Types inherited from kanzi::GLGraphicsOutput
using GLProcPointer = void(*)()
 Pointer to GL function. More...
 

Detailed Description

Class representing a default QNX EGL graphics output.

Constructor & Destructor Documentation

◆ DefaultQnxEGLGraphicsOutput()

kanzi::qnx::DefaultQnxEGLGraphicsOutput::DefaultQnxEGLGraphicsOutput ( const DefaultQnxEGLGraphicsOutputProperties properties)
explicit

Constructor.

Parameters
propertiesSpecifies properties to request for the graphics output.

◆ ~DefaultQnxEGLGraphicsOutput()

kanzi::qnx::DefaultQnxEGLGraphicsOutput::~DefaultQnxEGLGraphicsOutput ( )

Destructor.

Member Function Documentation

◆ logWindowPosition()

void kanzi::qnx::DefaultQnxEGLGraphicsOutput::logWindowPosition ( ) const
noexcept

Prints the active window position to log.

◆ logWindowSize()

void kanzi::qnx::DefaultQnxEGLGraphicsOutput::logWindowSize ( ) const
noexcept

Prints the active window size to log.

◆ setWindowZOrder()

bool kanzi::qnx::DefaultQnxEGLGraphicsOutput::setWindowZOrder ( int  zorder)
noexcept

Sets the z ordering for the active window related to all other windows currently visible.

Parameters
zorderZ ordering.
Returns
True on success, false on failure.

◆ makeWindowOpaque()

bool kanzi::qnx::DefaultQnxEGLGraphicsOutput::makeWindowOpaque ( )
noexcept

Makes the active window fully opaque.

Returns
True on success, false on failure.

◆ flushContext()

bool kanzi::qnx::DefaultQnxEGLGraphicsOutput::flushContext ( )
noexcept

Flush any pending Qnx screen requests to the compositor.

Returns
True on success, false on failure.

◆ gatherEvents()

void kanzi::qnx::DefaultQnxEGLGraphicsOutput::gatherEvents ( EventQueue queue)
overridevirtual

Amends the given event queue with events received so far.

Parameters
queueEvent queue to be amended. Do not clear nor assume to be empty.

Implements kanzi::EventSource.

◆ getNativeEventHandle()

optional<NativeEventHandle> kanzi::qnx::DefaultQnxEGLGraphicsOutput::getNativeEventHandle ( ) const
overridevirtualnoexcept

Returns a waitable event handle for this event source, if available.

Return values
nulloptGetting the event handle failed.
Returns
The native event handle.

Implements kanzi::EventSource.

◆ getProcAddress()

KZ_NO_DISCARD GLProcPointer kanzi::qnx::DefaultQnxEGLGraphicsOutput::getProcAddress ( string_view  functionName)
overridevirtual

Retrieves pointer to GL function.

Parameters
functionNameName of the function.
Returns
Pointer to the function, or null if not found.

Implements kanzi::GLGraphicsOutput.

◆ makeCurrent()

bool kanzi::qnx::DefaultQnxEGLGraphicsOutput::makeCurrent ( )
overridevirtualnoexcept

Make the current EGL thread active.

Returns
True on success, false on failure.

Implements kanzi::GLGraphicsOutput.

◆ releaseCurrent()

bool kanzi::qnx::DefaultQnxEGLGraphicsOutput::releaseCurrent ( )
overridevirtualnoexcept

Make the current EGL thread inactive.

Returns
True on success, false on failure.

Implements kanzi::GLGraphicsOutput.

◆ swapBuffers()

bool kanzi::qnx::DefaultQnxEGLGraphicsOutput::swapBuffers ( )
overridevirtual

Posts rendering results.

Implicitly flushes the rendering pipeline and executes all received rendering commands before posting.

Returns
True on success, false on failure.

Implements kanzi::GLGraphicsOutput.

◆ swapInterval()

bool kanzi::qnx::DefaultQnxEGLGraphicsOutput::swapInterval ( int  interval)
overridevirtual

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

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

Implements kanzi::GLGraphicsOutput.

◆ getTargetTransformation()

Matrix4x4 kanzi::qnx::DefaultQnxEGLGraphicsOutput::getTargetTransformation ( ) const
overridevirtualnoexcept

Returns the target transformation.

Returns
Target transformation matrix.

Implements kanzi::GLGraphicsOutput.

◆ getGraphicsContextAPI()

optional<GraphicsContextAPI> kanzi::qnx::DefaultQnxEGLGraphicsOutput::getGraphicsContextAPI ( ) const
overridevirtualnoexcept

Gets the API used by the associated graphics context.

Return values
nulloptGetting the graphics context failed.
Returns
Graphics context API.

Implements kanzi::GLGraphicsOutput.

◆ getSurfaceClientAPI()

optional<SurfaceClientAPI> kanzi::qnx::DefaultQnxEGLGraphicsOutput::getSurfaceClientAPI ( ) const
overridevirtualnoexcept

Gets the type of the associated graphics surface.

Return values
nulloptGetting the graphics surface failed.
Returns
Surface type.

Implements kanzi::GLGraphicsOutput.

◆ getColorSpace()

optional<SurfaceColorSpace> kanzi::qnx::DefaultQnxEGLGraphicsOutput::getColorSpace ( ) const
overridevirtualnoexcept

Gets the color space used by the associated graphics context.

Return values
nulloptGetting the color space failed.
Returns
Color Space.

Implements kanzi::GLGraphicsOutput.

◆ getNativeDisplayHandle()

KZ_NO_DISCARD optional<void*> kanzi::qnx::DefaultQnxEGLGraphicsOutput::getNativeDisplayHandle ( ) const
overridevirtualnoexcept

Gets associated native GL display handle.

Return values
nulloptGetting GL display failed.
Returns
The handle of associated display object.

Implements kanzi::GLGraphicsOutput.

◆ getNativeContextHandle()

KZ_NO_DISCARD optional<void*> kanzi::qnx::DefaultQnxEGLGraphicsOutput::getNativeContextHandle ( ) const
overridevirtualnoexcept

Gets associated native GL context handle.

Return values
nulloptGetting GL context failed.
Returns
The handle of associated graphics context object.

Implements kanzi::GLGraphicsOutput.

◆ getNativeSurfaceHandle()

KZ_NO_DISCARD optional<void*> kanzi::qnx::DefaultQnxEGLGraphicsOutput::getNativeSurfaceHandle ( ) const
overridevirtualnoexcept

Gets associated native GL surface handle.

Return values
nulloptGetting GL surface failed.
Returns
The handle of associated surface object.

Implements kanzi::GLGraphicsOutput.

◆ createImage()

KZ_NO_DISCARD optional<void*> kanzi::qnx::DefaultQnxEGLGraphicsOutput::createImage ( int  target,
void *  data,
int *  attributes 
)
overridevirtualnoexcept

Function for creating native image object, which can be shared between client APIs.

The returned image must be destroyed using destroyImage().

Parameters
targetContext-specific target specifier.
dataData to use as image contents.
attributesContext-specific attributes list.
Returns
Returns created image, or null on error.
See also
destroyImage().

Implements kanzi::GLGraphicsOutput.

◆ destroyImage()

bool kanzi::qnx::DefaultQnxEGLGraphicsOutput::destroyImage ( void *  image)
overridevirtualnoexcept

Destroys an EGL image.

Parameters
imageEGL image to destroy.
Returns
True on success, false on failure.

Implements kanzi::GLGraphicsOutput.

◆ resize()

bool kanzi::qnx::DefaultQnxEGLGraphicsOutput::resize ( unsigned int  width,
unsigned int  height 
)
overridevirtualnoexcept

Schedules a resize of the target layout area.

Parameters
widthNew target layout area width in pixels.
heightNew target layout area height in pixels.
Returns
True on success, false on failure.

Implements kanzi::WindowedGraphicsOutput.

◆ setWindowTitle()

bool kanzi::qnx::DefaultQnxEGLGraphicsOutput::setWindowTitle ( string_view  title)
overridevirtualnoexcept

Sets a title for the active window.

Parameters
titleWindow title to set.
Returns
True on success, false on failure.

Implements kanzi::WindowedGraphicsOutput.

◆ getWindowTitle()

optional<string> kanzi::qnx::DefaultQnxEGLGraphicsOutput::getWindowTitle ( ) const
overridevirtualnoexcept

Gets title for the active window.

Return values
nulloptGetting the title failed.
Returns
Window title.

Implements kanzi::WindowedGraphicsOutput.

◆ resizeWindow()

bool kanzi::qnx::DefaultQnxEGLGraphicsOutput::resizeWindow ( unsigned int  width,
unsigned int  height 
)
overridevirtualnoexcept

Schedules a resize of the active window.

Parameters
widthNew window width in implementation defined units.
heightNew window height in implementation defined units.
Returns
True on success, false on failure.

Implements kanzi::WindowedGraphicsOutput.

◆ getWindowWidth()

optional<unsigned int> kanzi::qnx::DefaultQnxEGLGraphicsOutput::getWindowWidth ( ) const
overridevirtualnoexcept

Returns the active window width.

Return values
nulloptGetting the width failed.
Returns
Window width in implementation defined units.

Implements kanzi::WindowedGraphicsOutput.

◆ getWindowHeight()

optional<unsigned int> kanzi::qnx::DefaultQnxEGLGraphicsOutput::getWindowHeight ( ) const
overridevirtualnoexcept

Returns the active window height.

Return values
nulloptGetting the height failed.
Returns
Window height in implementation defined units.

Implements kanzi::WindowedGraphicsOutput.

◆ moveWindow()

bool kanzi::qnx::DefaultQnxEGLGraphicsOutput::moveWindow ( int  positionX,
int  positionY 
)
overridevirtualnoexcept

Schedules a window move.

Parameters
positionXNew window x position in implementation defined units.
positionYNew window y position in implementation defined units.
Returns
True on success, false on failure.

Implements kanzi::WindowedGraphicsOutput.

◆ getWindowPositionX()

optional<int> kanzi::qnx::DefaultQnxEGLGraphicsOutput::getWindowPositionX ( ) const
overridevirtualnoexcept

Returns the window x position.

Return values
nulloptGetting the x position failed.
Returns
Window x position in implementation defined units.

Implements kanzi::WindowedGraphicsOutput.

◆ getWindowPositionY()

optional<int> kanzi::qnx::DefaultQnxEGLGraphicsOutput::getWindowPositionY ( ) const
overridevirtualnoexcept

Returns the window y position.

Return values
nulloptGetting the y position failed.
Returns
Window y position in implementation defined units.

Implements kanzi::WindowedGraphicsOutput.

◆ makeFullscreen()

bool kanzi::qnx::DefaultQnxEGLGraphicsOutput::makeFullscreen ( )
overridevirtualnoexcept

Schedules making the window fullscreen.

Returns
True on success, false on failure.

Implements kanzi::WindowedGraphicsOutput.

◆ makeRegular()

bool kanzi::qnx::DefaultQnxEGLGraphicsOutput::makeRegular ( )
overridevirtualnoexcept

Schedules making the window regular.

Returns
True on success, false on failure.

Implements kanzi::WindowedGraphicsOutput.

◆ makeMaximized()

bool kanzi::qnx::DefaultQnxEGLGraphicsOutput::makeMaximized ( )
overridevirtualnoexcept

Schedules maximizing the window.

Returns
True on success, false on failure.

Implements kanzi::WindowedGraphicsOutput.

◆ makeMinimized()

bool kanzi::qnx::DefaultQnxEGLGraphicsOutput::makeMinimized ( )
overridevirtualnoexcept

Schedules minimizing the window.

Returns
True on success, false on failure.

Implements kanzi::WindowedGraphicsOutput.

◆ showWindow()

bool kanzi::qnx::DefaultQnxEGLGraphicsOutput::showWindow ( )
overridevirtualnoexcept

Schedules making the window visible.

Returns
True on success, false on failure.

Implements kanzi::WindowedGraphicsOutput.

◆ hideWindow()

bool kanzi::qnx::DefaultQnxEGLGraphicsOutput::hideWindow ( )
overridevirtualnoexcept

Schedules making the window invisible.

Returns
True on success, false on failure.

Implements kanzi::WindowedGraphicsOutput.

◆ bringToFront()

bool kanzi::qnx::DefaultQnxEGLGraphicsOutput::bringToFront ( )
overridevirtualnoexcept

Schedules raising the window above other windows.

Returns
True on success, false on failure.

Implements kanzi::WindowedGraphicsOutput.

◆ getNativeWindowHandle()

optional<NativeWindowHandle> kanzi::qnx::DefaultQnxEGLGraphicsOutput::getNativeWindowHandle ( ) const
overridevirtualnoexcept

Gets the associated window handle.

Return values
nulloptGetting associated window handle failed.
Returns
Native window handle.

Implements kanzi::WindowedGraphicsOutput.

◆ setTargetTransformation()

void kanzi::qnx::DefaultQnxEGLGraphicsOutput::setTargetTransformation ( Matrix4x4  targetTransformation)
inlineprotectednoexcept

Sets the target transformation.

Parameters
targetTransformationThe target transformation matrix.

◆ updateCachedValues()

void kanzi::qnx::DefaultQnxEGLGraphicsOutput::updateCachedValues ( unsigned int  width,
unsigned int  height 
)
protectednoexcept

Updates all cached values from given layout size.

Parameters
widthLayout area width in pixels.
heightLayout area height in pixels.

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