Kanzi 4.0.0-beta2
kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput Class Reference

Class representing a default Android window surface EGL graphics output. More...

#include <kanzi/core.ui/platform/graphics_output/android_ws_egl/default_android_ws_egl_graphics_output.hpp>

Inheritance diagram for kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput:
[legend]

Public Member Functions

bool bringToFront () noexcept override
 WindowedGraphicsOutput::bringToFront() implementation.
 
KZ_NO_DISCARD optional< void * > createImage (int target, void *data, int *attributes) noexcept override
 Creates a native image object, which can be shared between client APIs.
 
 DefaultAndroidWSEGLGraphicsOutput (const DefaultAndroidWSEGLGraphicsOutputProperties &properties)
 Constructor.
 
bool destroyImage (void *image) noexcept override
 Destroys an EGL image.
 
void gatherEvents (EventQueue &queue) override
 Amends the given event queue with the events received so far.
 
optional< SurfaceColorSpacegetColorSpace () const noexcept override
 Gets the color space used by the associated graphics context.
 
optional< GraphicsContextAPIgetGraphicsContextAPI () const noexcept override
 Gets the API used by the associated graphics context.
 
KZ_NO_DISCARD optional< void * > getNativeContextHandle () const noexcept override
 Gets the associated native GL context handle.
 
KZ_NO_DISCARD optional< void * > getNativeDisplayHandle () const noexcept override
 Gets the associated native GL display handle.
 
KZ_NO_DISCARD optional< NativeEventHandlegetNativeEventHandle () const noexcept override
 Returns a waitable event handle for this event source, if available.
 
KZ_NO_DISCARD optional< void * > getNativeSurfaceHandle () const noexcept override
 Gets the associated native GL surface handle.
 
KZ_NO_DISCARD optional< NativeWindowHandlegetNativeWindowHandle () const noexcept override
 WindowedGraphicsOutput::getNativeWindowHandle() implementation.
 
KZ_NO_DISCARD GLProcPointer getProcAddress (string_view functionName) override
 Retrieves pointer to GL function.
 
optional< SurfaceClientAPIgetSurfaceClientAPI () const noexcept override
 Gets the type of the associated graphics surface.
 
Matrix4x4 getTargetTransformation () const noexcept override
 Returns the target transformation matrix.
 
KZ_NO_DISCARD optional< unsigned intgetWindowHeight () const noexcept override
 WindowedGraphicsOutput::getWindowHeight() implementation.
 
KZ_NO_DISCARD optional< intgetWindowPositionX () const noexcept override
 WindowedGraphicsOutput::getWindowPositionX() implementation.
 
KZ_NO_DISCARD optional< intgetWindowPositionY () const noexcept override
 WindowedGraphicsOutput::getWindowPositionY() implementation.
 
KZ_NO_DISCARD optional< string > getWindowTitle () const noexcept override
 WindowedGraphicsOutput::getWindowTitle() implementation.
 
KZ_NO_DISCARD optional< unsigned intgetWindowWidth () const noexcept override
 WindowedGraphicsOutput::getWindowWidth() implementation.
 
bool hideWindow () noexcept override
 WindowedGraphicsOutput::hideWindow() implementation.
 
void listCurrentEGLConfig () const noexcept
 Lists the current valid EGL configuration.
 
void listEGLConfigs () const noexcept
 Lists all valid EGL configurations. If EGL display is no display, lists nothing.
 
bool makeCurrent () noexcept override
 Activates the current EGL thread.
 
bool makeFullscreen () noexcept override
 WindowedGraphicsOutput::makeFullscreen() implementation.
 
bool makeMaximized () noexcept override
 WindowedGraphicsOutput::makeMaximized() implementation.
 
bool makeMinimized () noexcept override
 WindowedGraphicsOutput::makeMinimized() implementation.
 
bool makeRegular () noexcept override
 WindowedGraphicsOutput::makeRegular() implementation.
 
bool moveWindow (int positionX, int positionY) noexcept override
 WindowedGraphicsOutput::moveWindow() implementation.
 
bool releaseCurrent () noexcept override
 Deactivates the current EGL thread.
 
bool resize (unsigned int width, unsigned int height) noexcept override
 WindowedGraphicsOutput::resize() implementation.
 
bool resizeWindow (unsigned int width, unsigned int height) noexcept override
 WindowedGraphicsOutput::resizeWindow() implementation.
 
bool setWindowTitle (string_view title) noexcept override
 WindowedGraphicsOutput::setWindowTitle() implementation.
 
bool setWindowZOrder (int windowZOrder)
 Sets the Z order of a window.
 
bool showWindow () noexcept override
 WindowedGraphicsOutput::showWindow() implementation.
 
bool swapBuffers () override
 Posts rendering results.
 
bool swapInterval (int interval) override
 Sets the minimum number of displayed video frames before a buffer swap.
 
 ~DefaultAndroidWSEGLGraphicsOutput ()
 Destructor.
 
- 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.
 
KZ_NO_DISCARD unsigned int getHeight () const noexcept
 Returns the height of layout area in the target coordinate system.
 
KZ_NO_DISCARD unsigned int getWidth () const noexcept
 Returns the width of layout area in the target coordinate system.
 
virtual ~GraphicsOutput ()=default
 Destructor.
 
- Public Member Functions inherited from kanzi::EventSource
virtual ~EventSource ()=default
 Destructor.
 
- Public Member Functions inherited from kanzi::WakeupSignalSource
WakeupSignalSourceoperator= (const WakeupSignalSource &)=default
 Copy assignment operator.
 
WakeupSignalSourceoperator= (WakeupSignalSource &&) noexcept=default
 Move assignment operator.
 
 WakeupSignalSource ()=default
 Constructor.
 
 WakeupSignalSource (const WakeupSignalSource &)=default
 Copy constructor.
 
 WakeupSignalSource (WakeupSignalSource &&) noexcept=default
 Move constructor.
 
virtual ~WakeupSignalSource ()=default
 Destructor.
 
- Public Member Functions inherited from kanzi::WindowedGraphicsOutput
virtual ~WindowedGraphicsOutput ()=default
 Destructor.
 

Protected Member Functions

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

Detailed Description

Class representing a default Android window surface EGL graphics output.

Since
Kanzi 3.9.8

Constructor & Destructor Documentation

◆ DefaultAndroidWSEGLGraphicsOutput()

kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::DefaultAndroidWSEGLGraphicsOutput ( const DefaultAndroidWSEGLGraphicsOutputProperties & properties)
explicit

Constructor.

Parameters
propertiesProperties to request for the graphics output.

◆ ~DefaultAndroidWSEGLGraphicsOutput()

kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::~DefaultAndroidWSEGLGraphicsOutput ( )

Destructor.

Member Function Documentation

◆ gatherEvents()

void kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::gatherEvents ( EventQueue & queue)
overridevirtual

Amends the given event queue with the events received so far.

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

Implements kanzi::EventSource.

◆ getNativeEventHandle()

KZ_NO_DISCARD optional< NativeEventHandle > kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::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::WakeupSignalSource.

◆ getProcAddress()

KZ_NO_DISCARD GLProcPointer kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::getProcAddress ( string_view functionName)
override

Retrieves pointer to GL function.

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

◆ makeCurrent()

bool kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::makeCurrent ( )
overridenoexcept

Activates the current EGL thread.

Returns
On success, true, otherwise false.

◆ releaseCurrent()

bool kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::releaseCurrent ( )
overridenoexcept

Deactivates the current EGL thread.

Returns
On success, true, otherwise false.

◆ swapBuffers()

bool kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::swapBuffers ( )
override

Posts rendering results.

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

Returns
On success, true, otherwise false.

◆ swapInterval()

bool kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::swapInterval ( int interval)
override

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

Parameters
intervalMinimum number of video frames to wait before buffer swap.
Returns
On success, true, otherwise false.

◆ getTargetTransformation()

Matrix4x4 kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::getTargetTransformation ( ) const
overridenoexcept

Returns the target transformation matrix.

Returns
Target transformation matrix.

◆ getGraphicsContextAPI()

optional< GraphicsContextAPI > kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::getGraphicsContextAPI ( ) const
overridenoexcept

Gets the API used by the associated graphics context.

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

◆ getSurfaceClientAPI()

optional< SurfaceClientAPI > kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::getSurfaceClientAPI ( ) const
overridenoexcept

Gets the type of the associated graphics surface.

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

◆ getColorSpace()

optional< SurfaceColorSpace > kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::getColorSpace ( ) const
overridenoexcept

Gets the color space used by the associated graphics context.

Return values
nulloptGetting the color space failed.
Returns
Color space used by the associated graphics context.

◆ getNativeDisplayHandle()

KZ_NO_DISCARD optional< void * > kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::getNativeDisplayHandle ( ) const
overridenoexcept

Gets the associated native GL display handle.

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

◆ getNativeContextHandle()

KZ_NO_DISCARD optional< void * > kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::getNativeContextHandle ( ) const
overridenoexcept

Gets the associated native GL context handle.

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

◆ getNativeSurfaceHandle()

KZ_NO_DISCARD optional< void * > kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::getNativeSurfaceHandle ( ) const
overridenoexcept

Gets the associated native GL surface handle.

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

◆ createImage()

KZ_NO_DISCARD optional< void * > kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::createImage ( int target,
void * data,
int * attributes )
overridenoexcept

Creates a native image object, which can be shared between client APIs.

To destroy the returned image, use destroyImage().

Parameters
targetContext-specific target specifier.
dataData to use for the image content.
attributesContext-specific attributes list.
Returns
Created image, on error, null.
See also
destroyImage().

◆ destroyImage()

bool kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::destroyImage ( void * image)
overridenoexcept

Destroys an EGL image.

Parameters
imageEGL image to destroy.
Returns
On success, true, otherwise false.

◆ listEGLConfigs()

void kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::listEGLConfigs ( ) const
noexcept

Lists all valid EGL configurations. If EGL display is no display, lists nothing.

◆ listCurrentEGLConfig()

void kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::listCurrentEGLConfig ( ) const
noexcept

Lists the current valid EGL configuration.

If EGL display is no display or EGL configuration is no configuration, lists nothing.

◆ setWindowZOrder()

bool kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::setWindowZOrder ( int windowZOrder)

Sets the Z order of a window.

Parameters
windowZOrderZ order value to set.
Returns
On success, true, otherwise false.

◆ resize()

bool kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::resize ( unsigned int width,
unsigned int height )
overridevirtualnoexcept

WindowedGraphicsOutput::resize() implementation.

Parameters
widthwindow width to set.
heightwindow height to set.
Returns
On success, true, otherwise false.

Implements kanzi::WindowedGraphicsOutput.

◆ setWindowTitle()

bool kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::setWindowTitle ( string_view title)
overridevirtualnoexcept

WindowedGraphicsOutput::setWindowTitle() implementation.

Returns
Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ getWindowTitle()

KZ_NO_DISCARD optional< string > kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::getWindowTitle ( ) const
overridevirtualnoexcept

WindowedGraphicsOutput::getWindowTitle() implementation.

Returns
Returns nullopt.

Implements kanzi::WindowedGraphicsOutput.

◆ resizeWindow()

bool kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::resizeWindow ( unsigned int width,
unsigned int height )
overridevirtualnoexcept

WindowedGraphicsOutput::resizeWindow() implementation.

Parameters
widthwindow width to set.
heightwindow height to set.
Returns
Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ getWindowWidth()

KZ_NO_DISCARD optional< unsigned int > kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::getWindowWidth ( ) const
overridevirtualnoexcept

WindowedGraphicsOutput::getWindowWidth() implementation.

Returns nullopt.

Implements kanzi::WindowedGraphicsOutput.

◆ getWindowHeight()

KZ_NO_DISCARD optional< unsigned int > kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::getWindowHeight ( ) const
overridevirtualnoexcept

WindowedGraphicsOutput::getWindowHeight() implementation.

Returns nullopt.

Implements kanzi::WindowedGraphicsOutput.

◆ moveWindow()

bool kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::moveWindow ( int positionX,
int positionY )
overridevirtualnoexcept

WindowedGraphicsOutput::moveWindow() implementation.

Parameters
positionXwindow position X to be set.
positionYwindow position Y to be set.
Returns
On success, true, otherwise false.

Implements kanzi::WindowedGraphicsOutput.

◆ getWindowPositionX()

KZ_NO_DISCARD optional< int > kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::getWindowPositionX ( ) const
overridevirtualnoexcept

◆ getWindowPositionY()

KZ_NO_DISCARD optional< int > kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::getWindowPositionY ( ) const
overridevirtualnoexcept

◆ makeFullscreen()

bool kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::makeFullscreen ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeFullscreen() implementation.

Returns
Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ makeRegular()

bool kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::makeRegular ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeRegular() implementation.

Returns
Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ makeMaximized()

bool kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::makeMaximized ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeMaximized() implementation.

Returns
Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ makeMinimized()

bool kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::makeMinimized ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeMinimized() implementation.

Returns
Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ showWindow()

bool kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::showWindow ( )
overridevirtualnoexcept

WindowedGraphicsOutput::showWindow() implementation.

Returns
Returns true.

Implements kanzi::WindowedGraphicsOutput.

◆ hideWindow()

bool kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::hideWindow ( )
overridevirtualnoexcept

WindowedGraphicsOutput::hideWindow() implementation.

Returns
Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ bringToFront()

bool kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::bringToFront ( )
overridevirtualnoexcept

WindowedGraphicsOutput::bringToFront() implementation.

Returns
Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ getNativeWindowHandle()

KZ_NO_DISCARD optional< NativeWindowHandle > kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::getNativeWindowHandle ( ) const
overridevirtualnoexcept

WindowedGraphicsOutput::getNativeWindowHandle() implementation.

Return values
nulloptGetting the native window handle failed.
Returns
The handle of the associated window object.

Implements kanzi::WindowedGraphicsOutput.

◆ setTargetTransformation()

void kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::setTargetTransformation ( Matrix4x4 targetTransformation)
inlineprotectednoexcept

Sets the target transformation matrix.

Parameters
targetTransformationThe target transformation matrix.

◆ updateCachedValues()

void kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::updateCachedValues ( unsigned int width,
unsigned int height )
protectednoexcept

Updates all cached values from the 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: