Kanzi  3.9.8
Kanzi Engine C++ API
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. More...
 
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. More...
 
 DefaultAndroidWSEGLGraphicsOutput (const DefaultAndroidWSEGLGraphicsOutputProperties &properties)
 Constructor. More...
 
bool destroyImage (void *image) noexcept override
 Destroys an EGL image. More...
 
void gatherEvents (EventQueue &queue) override
 Amends the given event queue with the 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 the associated native GL context handle. More...
 
KZ_NO_DISCARD optional< void * > getNativeDisplayHandle () const noexcept override
 Gets the 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 the associated native GL surface handle. More...
 
KZ_NO_DISCARD optional< NativeWindowHandle > getNativeWindowHandle () const noexcept override
 WindowedGraphicsOutput::getNativeWindowHandle() implementation. 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 matrix. More...
 
KZ_NO_DISCARD optional< unsigned int > getWindowHeight () const noexcept override
 WindowedGraphicsOutput::getWindowHeight() implementation. More...
 
KZ_NO_DISCARD optional< int > getWindowPositionX () const noexcept override
 WindowedGraphicsOutput::getWindowPositionX() implementation. More...
 
KZ_NO_DISCARD optional< int > getWindowPositionY () const noexcept override
 WindowedGraphicsOutput::getWindowPositionY() implementation. More...
 
KZ_NO_DISCARD optional< stringgetWindowTitle () const noexcept override
 WindowedGraphicsOutput::getWindowTitle() implementation. More...
 
KZ_NO_DISCARD optional< unsigned int > getWindowWidth () const noexcept override
 WindowedGraphicsOutput::getWindowWidth() implementation. More...
 
bool hideWindow () noexcept override
 WindowedGraphicsOutput::hideWindow() implementation. More...
 
void listCurrentEGLConfig () const noexcept
 Lists the current valid EGL configuration. More...
 
void listEGLConfigs () const noexcept
 Lists all valid EGL configurations. If EGL display is no display, lists nothing. More...
 
bool makeCurrent () noexcept override
 Activates the current EGL thread. More...
 
bool makeFullscreen () noexcept override
 WindowedGraphicsOutput::makeFullscreen() implementation. More...
 
bool makeMaximized () noexcept override
 WindowedGraphicsOutput::makeMaximized() implementation. More...
 
bool makeMinimized () noexcept override
 WindowedGraphicsOutput::makeMinimized() implementation. More...
 
bool makeRegular () noexcept override
 WindowedGraphicsOutput::makeRegular() implementation. More...
 
bool moveWindow (int positionX, int positionY) noexcept override
 WindowedGraphicsOutput::moveWindow() implementation. More...
 
bool releaseCurrent () noexcept override
 Deactivates the current EGL thread. More...
 
bool resize (unsigned int width, unsigned int height) noexcept override
 WindowedGraphicsOutput::resize() implementation. More...
 
bool resizeWindow (unsigned int width, unsigned int height) noexcept override
 WindowedGraphicsOutput::resizeWindow() implementation. More...
 
bool setWindowTitle (string_view title) noexcept override
 WindowedGraphicsOutput::setWindowTitle() implementation. More...
 
bool setWindowZOrder (int windowZOrder)
 Sets the Z order of a window. More...
 
bool showWindow () noexcept override
 WindowedGraphicsOutput::showWindow() implementation. More...
 
bool swapBuffers () override
 Posts rendering results. More...
 
bool swapInterval (int interval) override
 Sets the minimum number of displayed video frames before a buffer swap. More...
 
 ~DefaultAndroidWSEGLGraphicsOutput ()
 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 matrix. More...
 
void updateCachedValues (unsigned int width, unsigned int height) noexcept
 Updates all cached values from the 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 Android window surface EGL graphics output.

Since
Kanzi 3.9.8

Constructor & Destructor Documentation

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

Constructor.

Parameters
propertiesProperties to request for the graphics output.
kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::~DefaultAndroidWSEGLGraphicsOutput ( )

Destructor.

Member Function Documentation

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.

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::EventSource.

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

Retrieves pointer to GL function.

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

Implements kanzi::GLGraphicsOutput.

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

Activates the current EGL thread.

Returns
On success, true, otherwise false.

Implements kanzi::GLGraphicsOutput.

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

Deactivates the current EGL thread.

Returns
On success, true, otherwise false.

Implements kanzi::GLGraphicsOutput.

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

Posts rendering results.

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

Returns
On success, true, otherwise false.

Implements kanzi::GLGraphicsOutput.

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

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.

Implements kanzi::GLGraphicsOutput.

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

Returns the target transformation matrix.

Returns
Target transformation matrix.

Implements kanzi::GLGraphicsOutput.

optional<GraphicsContextAPI> kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::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.

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

Gets the type of the associated graphics surface.

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

Implements kanzi::GLGraphicsOutput.

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

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.

Implements kanzi::GLGraphicsOutput.

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

Gets the associated native GL display handle.

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

Implements kanzi::GLGraphicsOutput.

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

Gets the associated native GL context handle.

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

Implements kanzi::GLGraphicsOutput.

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

Gets the associated native GL surface handle.

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

Implements kanzi::GLGraphicsOutput.

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

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

Implements kanzi::GLGraphicsOutput.

bool kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput::destroyImage ( void image)
overridevirtualnoexcept

Destroys an EGL image.

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

Implements kanzi::GLGraphicsOutput.

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

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

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.

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

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

WindowedGraphicsOutput::setWindowTitle() implementation.

Returns
Returns false.

Implements kanzi::WindowedGraphicsOutput.

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

WindowedGraphicsOutput::getWindowTitle() implementation.

Returns
Returns nullopt.

Implements kanzi::WindowedGraphicsOutput.

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.

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

WindowedGraphicsOutput::getWindowWidth() implementation.

Returns nullopt.

Implements kanzi::WindowedGraphicsOutput.

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

WindowedGraphicsOutput::getWindowHeight() implementation.

Returns nullopt.

Implements kanzi::WindowedGraphicsOutput.

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.

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

WindowedGraphicsOutput::makeFullscreen() implementation.

Returns
Returns false.

Implements kanzi::WindowedGraphicsOutput.

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

WindowedGraphicsOutput::makeRegular() implementation.

Returns
Returns false.

Implements kanzi::WindowedGraphicsOutput.

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

WindowedGraphicsOutput::makeMaximized() implementation.

Returns
Returns false.

Implements kanzi::WindowedGraphicsOutput.

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

WindowedGraphicsOutput::makeMinimized() implementation.

Returns
Returns false.

Implements kanzi::WindowedGraphicsOutput.

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

WindowedGraphicsOutput::showWindow() implementation.

Returns
Returns true.

Implements kanzi::WindowedGraphicsOutput.

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

WindowedGraphicsOutput::hideWindow() implementation.

Returns
Returns false.

Implements kanzi::WindowedGraphicsOutput.

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

WindowedGraphicsOutput::bringToFront() implementation.

Returns
Returns false.

Implements kanzi::WindowedGraphicsOutput.

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.

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

Sets the target transformation matrix.

Parameters
targetTransformationThe target transformation matrix.
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: