Kanzi  3.9.9
Kanzi Engine C++ API
kanzi::wayland::DefaultWaylandEGLGraphicsOutput Class Reference

Class that represents the default Wayland EGL graphics output. More...

#include <kanzi/core.ui/platform/graphics_output/wayland_egl/default_wayland_egl_graphics_output.hpp>

Inheritance diagram for kanzi::wayland::DefaultWaylandEGLGraphicsOutput:
[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
 GLGraphicsOutput::createImage() implementation. More...
 
 DefaultWaylandEGLGraphicsOutput (const DefaultWaylandEGLGraphicsOutputProperties &properties)
 Constructor. More...
 
 DefaultWaylandEGLGraphicsOutput (const DefaultWaylandEGLGraphicsOutput &)=delete
 Copy constructor. More...
 
 DefaultWaylandEGLGraphicsOutput (DefaultWaylandEGLGraphicsOutput &&) noexcept=delete
 Move constructor. More...
 
bool destroyImage (void *image) noexcept override
 GLGraphicsOutput::destroyImage() implementation. More...
 
bool dispatch () const noexcept
 Dispatches queued Wayland events. More...
 
bool dispatchPending () const noexcept
 Dispatches queued Wayland events. More...
 
void eventNotification (const WaylandEvent &event) noexcept override
 AbstractDefaultWaylandContext::eventNotification() implementation. More...
 
void gatherEvents (EventQueue &queue) override
 EventSource::gatherEvents() implementation. More...
 
KZ_NO_DISCARD optional< SurfaceColorSpacegetColorSpace () const noexcept override
 GLGraphicsOutput::getColorSpace() implementation. More...
 
KZ_NO_DISCARD optional< GraphicsContextAPIgetGraphicsContextAPI () const noexcept override
 GLGraphicsOutput::getGraphicsContextAPI() implementation. More...
 
KZ_NO_DISCARD optional< void * > getNativeContextHandle () const noexcept override
 GLGraphicsOutput::getNativeContextHandle() implementation. More...
 
KZ_NO_DISCARD optional< void * > getNativeDisplayHandle () const noexcept override
 GLGraphicsOutput::getNativeDisplayHandle() implementation. More...
 
optional< NativeEventHandlegetNativeEventHandle () const noexcept override
 EventSource::getNativeEventHandle() implementation. More...
 
KZ_NO_DISCARD optional< void * > getNativeSurfaceHandle () const noexcept override
 GLGraphicsOutput::getNativeSurfaceHandle() implementation. More...
 
KZ_NO_DISCARD optional< NativeWindowHandle > getNativeWindowHandle () const noexcept override
 WindowedGraphicsOutput::getNativeWindowHandle() implementation. More...
 
KZ_NO_DISCARD GLProcPointer getProcAddress (string_view functionName) override
 GLGraphicsOutput::getProcAddress() implementation. More...
 
KZ_NO_DISCARD optional< SurfaceClientAPIgetSurfaceClientAPI () const noexcept override
 GLGraphicsOutput::getSurfaceClientAPI() implementation. More...
 
KZ_NO_DISCARD Matrix4x4 getTargetTransformation () const noexcept override
 GLGraphicsOutput::getTargetTransformation() implementation. More...
 
KZ_NO_DISCARD const WaylandDisplaygetWaylandDisplay () const noexcept
 Gets the WaylandDisplay. 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< string > getWindowTitle () 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...
 
bool makeCurrent () override
 GLGraphicsOutput::makeCurrent() implementation. 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...
 
void modeChangeNotification (int width, int height, int refresh) noexcept override
 AbstractDefaultWaylandContext::modeChangeNotification() implementation. More...
 
bool moveWindow (int positionX, int positionY) noexcept override
 WindowedGraphicsOutput::moveWindow() implementation. More...
 
DefaultWaylandEGLGraphicsOutputoperator= (const DefaultWaylandEGLGraphicsOutput &)=delete
 Copy assignment operator. More...
 
DefaultWaylandEGLGraphicsOutputoperator= (DefaultWaylandEGLGraphicsOutput &&) noexcept=delete
 Move assignment operator. More...
 
bool registerFrameCallback (function< void()> &callback) noexcept
 Registers a frame callback in Wayland. More...
 
void registryAddedNotification (uint32_t name, const char *interfaceName, uint32_t version) noexcept override
 AbstractDefaultWaylandContext::registryAddedNotification() implementation. More...
 
bool releaseCurrent () override
 GLGraphicsOutput::releaseCurrent() implementation. More...
 
bool resize (unsigned int width, unsigned int height) noexcept override
 WindowedGraphicsOutput::resize() implementation. More...
 
void resizeNotification (int windowWidth, int windowHeight) noexcept override
 AbstractDefaultWaylandContext::resizeNotification() implementation. More...
 
bool resizeWindow (unsigned int width, unsigned int height) noexcept override
 WindowedGraphicsOutput::resizeWindow() implementation. More...
 
void seatCapabilitiesNotification (uint32_t capabilities) noexcept override
 AbstractDefaultWaylandContext::seatCapabilitiesNotification() implementation. More...
 
bool setWindowTitle (string_view title) noexcept override
 WindowedGraphicsOutput::setWindowTitle() implementation. More...
 
bool showWindow () noexcept override
 WindowedGraphicsOutput::showWindow() implementation. More...
 
bool swapBuffers () override
 GLGraphicsOutput::swapBuffers() implementation. More...
 
bool swapInterval (int interval) override
 GLGraphicsOutput::swapInterval() implementation. More...
 
void updateCache (int width, int height) noexcept
 Updates the target layout area size. More...
 
 ~DefaultWaylandEGLGraphicsOutput () override
 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...
 
- Public Member Functions inherited from kanzi::wayland::AbstractDefaultWaylandContext
 AbstractDefaultWaylandContext ()=default
 Constructor. More...
 
 AbstractDefaultWaylandContext (const AbstractDefaultWaylandContext &)=delete
 Copy constructor. More...
 
 AbstractDefaultWaylandContext (AbstractDefaultWaylandContext &&) noexcept=delete
 Move constructor. More...
 
AbstractDefaultWaylandContextoperator= (const AbstractDefaultWaylandContext &)=delete
 Copy assignment operator. More...
 
AbstractDefaultWaylandContextoperator= (AbstractDefaultWaylandContext &&) noexcept=delete
 Move assignment operator. More...
 
virtual ~AbstractDefaultWaylandContext ()=default
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from kanzi::GLGraphicsOutput
using GLProcPointer) = void(*)(
 Pointer to GL function. 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...
 

Detailed Description

Class that represents the default Wayland EGL graphics output.

Since
Kanzi 3.9.8
See also
AbstractDefaultWaylandContext for Wayland-specific callbacks.

Constructor & Destructor Documentation

kanzi::wayland::DefaultWaylandEGLGraphicsOutput::DefaultWaylandEGLGraphicsOutput ( const DefaultWaylandEGLGraphicsOutputProperties properties)
explicit

Constructor.

Parameters
propertiesSpecifies properties to request for the graphics output.
kanzi::wayland::DefaultWaylandEGLGraphicsOutput::~DefaultWaylandEGLGraphicsOutput ( )
override

Destructor.

kanzi::wayland::DefaultWaylandEGLGraphicsOutput::DefaultWaylandEGLGraphicsOutput ( const DefaultWaylandEGLGraphicsOutput )
delete

Copy constructor.

kanzi::wayland::DefaultWaylandEGLGraphicsOutput::DefaultWaylandEGLGraphicsOutput ( DefaultWaylandEGLGraphicsOutput &&  )
deletenoexcept

Move constructor.

Member Function Documentation

void kanzi::wayland::DefaultWaylandEGLGraphicsOutput::updateCache ( int  width,
int  height 
)
noexcept

Updates the target layout area size.

Parameters
widthThe layout width in pixels.
heightThe layout height in pixels.
void kanzi::wayland::DefaultWaylandEGLGraphicsOutput::resizeNotification ( int  windowWidth,
int  windowHeight 
)
overridevirtualnoexcept
void kanzi::wayland::DefaultWaylandEGLGraphicsOutput::modeChangeNotification ( int  width,
int  height,
int  refresh 
)
overridevirtualnoexcept
void kanzi::wayland::DefaultWaylandEGLGraphicsOutput::eventNotification ( const WaylandEvent event)
overridevirtualnoexcept
void kanzi::wayland::DefaultWaylandEGLGraphicsOutput::seatCapabilitiesNotification ( uint32_t  capabilities)
overridevirtualnoexcept
void kanzi::wayland::DefaultWaylandEGLGraphicsOutput::registryAddedNotification ( uint32_t  name,
const char *  interfaceName,
uint32_t  version 
)
overridevirtualnoexcept
void kanzi::wayland::DefaultWaylandEGLGraphicsOutput::gatherEvents ( EventQueue queue)
overridevirtual

EventSource::gatherEvents() implementation.

Implements kanzi::EventSource.

optional<NativeEventHandle> kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getNativeEventHandle ( ) const
overridevirtualnoexcept
KZ_NO_DISCARD GLProcPointer kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getProcAddress ( string_view  functionName)
overridevirtual
bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::makeCurrent ( )
overridevirtual
bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::releaseCurrent ( )
overridevirtual
bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::swapBuffers ( )
overridevirtual
bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::swapInterval ( int  interval)
overridevirtual
KZ_NO_DISCARD optional<void*> kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getNativeDisplayHandle ( ) const
overridevirtualnoexcept
KZ_NO_DISCARD optional<void*> kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getNativeContextHandle ( ) const
overridevirtualnoexcept
KZ_NO_DISCARD optional<void*> kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getNativeSurfaceHandle ( ) const
overridevirtualnoexcept
KZ_NO_DISCARD optional<void*> kanzi::wayland::DefaultWaylandEGLGraphicsOutput::createImage ( int  target,
void *  data,
int *  attributes 
)
overridevirtualnoexcept
bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::destroyImage ( void *  image)
overridevirtualnoexcept
KZ_NO_DISCARD optional<GraphicsContextAPI> kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getGraphicsContextAPI ( ) const
overridevirtualnoexcept
KZ_NO_DISCARD optional<SurfaceClientAPI> kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getSurfaceClientAPI ( ) const
overridevirtualnoexcept
KZ_NO_DISCARD optional<SurfaceColorSpace> kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getColorSpace ( ) const
overridevirtualnoexcept
KZ_NO_DISCARD Matrix4x4 kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getTargetTransformation ( ) const
overridevirtualnoexcept
bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::resize ( unsigned int  width,
unsigned int  height 
)
overridevirtualnoexcept
bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::setWindowTitle ( string_view  title)
overridevirtualnoexcept
KZ_NO_DISCARD optional<string> kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getWindowTitle ( ) const
overridevirtualnoexcept
bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::resizeWindow ( unsigned int  width,
unsigned int  height 
)
overridevirtualnoexcept
KZ_NO_DISCARD optional<unsigned int> kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getWindowWidth ( ) const
overridevirtualnoexcept
KZ_NO_DISCARD optional<unsigned int> kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getWindowHeight ( ) const
overridevirtualnoexcept
bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::moveWindow ( int  positionX,
int  positionY 
)
overridevirtualnoexcept
KZ_NO_DISCARD optional<int> kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getWindowPositionX ( ) const
overridevirtualnoexcept
KZ_NO_DISCARD optional<int> kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getWindowPositionY ( ) const
overridevirtualnoexcept
bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::makeFullscreen ( )
overridevirtualnoexcept
bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::makeRegular ( )
overridevirtualnoexcept
bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::makeMaximized ( )
overridevirtualnoexcept
bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::makeMinimized ( )
overridevirtualnoexcept
bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::showWindow ( )
overridevirtualnoexcept
bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::hideWindow ( )
overridevirtualnoexcept
bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::bringToFront ( )
overridevirtualnoexcept
bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::registerFrameCallback ( function< void()> &  callback)
noexcept

Registers a frame callback in Wayland.

The best way to organize a rendering loop in Wayland is to let the compositor control when it is time to render a frame. To do this, use this function to register a frame callback that compositor calls for each frame.

Using Wayland rendering loop allows to save computer resources if compositor determines that your application must be rendered at lower refresh rate or not rendered. For example, when the application is off-screen or minimized.

Keep in mind that Wayland controls when the rendering occurs. Do not make any assumptions about the time between frames.

Parameters
callbackCallback function to call each frame.
Returns
On success, true, otherwise false.
bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::dispatch ( ) const
noexcept

Dispatches queued Wayland events.

If no events are queued, this operation blocks until the next event occurs.

Returns
On success, true, otherwise false.
See also
WaylandDisplay::dispatch()
bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::dispatchPending ( ) const
noexcept

Dispatches queued Wayland events.

If no events are queued, this operation returns without blocking.

Returns
On success, true, otherwise false.
See also
WaylandDisplay::dispatchPending()
KZ_NO_DISCARD const WaylandDisplay& kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getWaylandDisplay ( ) const
noexcept

Gets the WaylandDisplay.

Returns
Wayland display used by this GraphicsOutput.
KZ_NO_DISCARD optional<NativeWindowHandle> kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getNativeWindowHandle ( ) const
overridevirtualnoexcept
DefaultWaylandEGLGraphicsOutput& kanzi::wayland::DefaultWaylandEGLGraphicsOutput::operator= ( const DefaultWaylandEGLGraphicsOutput )
delete

Copy assignment operator.

DefaultWaylandEGLGraphicsOutput& kanzi::wayland::DefaultWaylandEGLGraphicsOutput::operator= ( DefaultWaylandEGLGraphicsOutput &&  )
deletenoexcept

Move assignment operator.


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