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

Additional Inherited Members

- Public Types inherited from kanzi::GLGraphicsOutput
using GLProcPointer
 Pointer to GL function.
 
- 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 that represents the default Wayland EGL graphics output.

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

Constructor & Destructor Documentation

◆ DefaultWaylandEGLGraphicsOutput() [1/3]

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

Constructor.

Parameters
propertiesSpecifies properties to request for the graphics output.

◆ ~DefaultWaylandEGLGraphicsOutput()

kanzi::wayland::DefaultWaylandEGLGraphicsOutput::~DefaultWaylandEGLGraphicsOutput ( )
override

Destructor.

◆ DefaultWaylandEGLGraphicsOutput() [2/3]

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

Copy constructor.

◆ DefaultWaylandEGLGraphicsOutput() [3/3]

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

Move constructor.

Member Function Documentation

◆ updateCache()

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.

◆ resizeNotification()

void kanzi::wayland::DefaultWaylandEGLGraphicsOutput::resizeNotification ( int windowWidth,
int windowHeight )
overridevirtualnoexcept

◆ modeChangeNotification()

void kanzi::wayland::DefaultWaylandEGLGraphicsOutput::modeChangeNotification ( int width,
int height,
int refresh )
overridevirtualnoexcept

◆ eventNotification()

void kanzi::wayland::DefaultWaylandEGLGraphicsOutput::eventNotification ( const WaylandEvent & event)
overridevirtualnoexcept

◆ seatCapabilitiesNotification()

void kanzi::wayland::DefaultWaylandEGLGraphicsOutput::seatCapabilitiesNotification ( uint32_t capabilities)
overridevirtualnoexcept

◆ registryAddedNotification()

void kanzi::wayland::DefaultWaylandEGLGraphicsOutput::registryAddedNotification ( uint32_t name,
const char * interfaceName,
uint32_t version )
overridevirtualnoexcept

◆ gatherEvents()

void kanzi::wayland::DefaultWaylandEGLGraphicsOutput::gatherEvents ( EventQueue & queue)
overridevirtual

EventSource::gatherEvents() implementation.

Implements kanzi::EventSource.

◆ getNativeEventHandle()

optional< NativeEventHandle > kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getNativeEventHandle ( ) const
overridevirtualnoexcept

◆ getProcAddress()

KZ_NO_DISCARD GLProcPointer kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getProcAddress ( string_view functionName)
overridevirtual

◆ makeCurrent()

bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::makeCurrent ( )
overridevirtual

◆ releaseCurrent()

bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::releaseCurrent ( )
overridevirtual

◆ swapBuffers()

bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::swapBuffers ( )
overridevirtual

◆ swapInterval()

bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::swapInterval ( int interval)
overridevirtual

◆ getNativeDisplayHandle()

KZ_NO_DISCARD optional< void * > kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getNativeDisplayHandle ( ) const
overridevirtualnoexcept

◆ getNativeContextHandle()

KZ_NO_DISCARD optional< void * > kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getNativeContextHandle ( ) const
overridevirtualnoexcept

◆ getNativeSurfaceHandle()

KZ_NO_DISCARD optional< void * > kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getNativeSurfaceHandle ( ) const
overridevirtualnoexcept

◆ createImage()

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

◆ destroyImage()

bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::destroyImage ( void * image)
overridevirtualnoexcept

◆ getGraphicsContextAPI()

KZ_NO_DISCARD optional< GraphicsContextAPI > kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getGraphicsContextAPI ( ) const
overridevirtualnoexcept

◆ getSurfaceClientAPI()

KZ_NO_DISCARD optional< SurfaceClientAPI > kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getSurfaceClientAPI ( ) const
overridevirtualnoexcept

◆ getColorSpace()

KZ_NO_DISCARD optional< SurfaceColorSpace > kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getColorSpace ( ) const
overridevirtualnoexcept

◆ getTargetTransformation()

KZ_NO_DISCARD Matrix4x4 kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getTargetTransformation ( ) const
overridevirtualnoexcept

◆ resize()

bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::resize ( unsigned int width,
unsigned int height )
overridevirtualnoexcept

◆ setWindowTitle()

bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::setWindowTitle ( string_view title)
overridevirtualnoexcept

◆ getWindowTitle()

KZ_NO_DISCARD optional< string > kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getWindowTitle ( ) const
overridevirtualnoexcept

◆ resizeWindow()

bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::resizeWindow ( unsigned int width,
unsigned int height )
overridevirtualnoexcept

◆ getWindowWidth()

KZ_NO_DISCARD optional< unsigned int > kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getWindowWidth ( ) const
overridevirtualnoexcept

◆ getWindowHeight()

KZ_NO_DISCARD optional< unsigned int > kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getWindowHeight ( ) const
overridevirtualnoexcept

◆ moveWindow()

bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::moveWindow ( int positionX,
int positionY )
overridevirtualnoexcept

◆ getWindowPositionX()

KZ_NO_DISCARD optional< int > kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getWindowPositionX ( ) const
overridevirtualnoexcept

◆ getWindowPositionY()

KZ_NO_DISCARD optional< int > kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getWindowPositionY ( ) const
overridevirtualnoexcept

◆ makeFullscreen()

bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::makeFullscreen ( )
overridevirtualnoexcept

◆ makeRegular()

bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::makeRegular ( )
overridevirtualnoexcept

◆ makeMaximized()

bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::makeMaximized ( )
overridevirtualnoexcept

◆ makeMinimized()

bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::makeMinimized ( )
overridevirtualnoexcept

◆ showWindow()

bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::showWindow ( )
overridevirtualnoexcept

◆ hideWindow()

bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::hideWindow ( )
overridevirtualnoexcept

◆ bringToFront()

bool kanzi::wayland::DefaultWaylandEGLGraphicsOutput::bringToFront ( )
overridevirtualnoexcept

◆ registerFrameCallback()

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.

◆ dispatch()

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

◆ dispatchPending()

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

◆ getWaylandDisplay()

KZ_NO_DISCARD const WaylandDisplay & kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getWaylandDisplay ( ) const
noexcept

Gets the WaylandDisplay.

Returns
Wayland display used by this GraphicsOutput.

◆ getNativeWindowHandle()

KZ_NO_DISCARD optional< NativeWindowHandle > kanzi::wayland::DefaultWaylandEGLGraphicsOutput::getNativeWindowHandle ( ) const
overridevirtualnoexcept

◆ operator=() [1/2]

DefaultWaylandEGLGraphicsOutput & kanzi::wayland::DefaultWaylandEGLGraphicsOutput::operator= ( const DefaultWaylandEGLGraphicsOutput & )
delete

Copy assignment operator.

◆ operator=() [2/2]

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

Move assignment operator.


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