Kanzi 4.0.0-beta2
kanzi::wayland::IviLayoutManager Class Reference

An abstraction class that allows to control IVI layers and surfaces. More...

#include <kanzi/core.ui/platform/windowing_ng/wayland_ivi_egl/wayland_ivi_layout_manager.hpp>

Public Member Functions

bool addListener (ivi_wm_listener &&listener, void *data) noexcept
 Adds a listener to the underlying IviWm.
 
bool addListener (ivi_wm_screen_listener &&listener, void *data) noexcept
 Adds a listener to the underlying IviScreen.
 
void bindLayer (uint32_t layerId) const noexcept
 Assigns a layer to the screen.
 
void bindSurface (uint32_t surfaceId, uint32_t layerId) const
 Assigns a surface to the specified layer.
 
void configureLayer (const IviLayerProps &layerProps) const
 Helper function that requests the compositor to change surface state to match the provided properties.
 
void configureSurface (const IviSurfaceProps &surfaceProps) const
 Helper function that will request compositor to change surface state to match supplied properties.
 
void createLayer (const IviLayerProps &iviLayerProps)
 Requests the compositor to create a layer.
 
void createSurface (const IviSurfaceProps &iviSurfaceProps)
 Requests the compositor to create a surface.
 
KZ_NO_DISCARD const IviLayerPropsgetLayerProps (uint32_t layerId) const noexcept
 Gets the internal layer state.
 
KZ_NO_DISCARD windowing::Size getResolution () const noexcept
 Gets screen resolution.
 
KZ_NO_DISCARD const IviSurfacePropsgetSurfaceProps (uint32_t surfaceId) const noexcept
 Gets the internal surface state.
 
void initializeLayer (const IviLayerProps &layerProps) const
 Helper function to set up a layer for use.
 
void initializeSurface (const IviSurfaceProps &surfaceProps) const
 Helper function to set up a surface for use.
 
 IviLayoutManager (ivi_wm *iviWmNativeHandle, const WaylandOutput &waylandOutput) noexcept
 Constructor.
 
void layerCreatedNotification (uint32_t layerId)
 Called by Wayland listener when layer is created.
 
void layerDestinationChangedNotification (uint32_t layerId, const windowing::Region &destination)
 Called by Wayland listener when layer destination rectangle changes.
 
void layerDestroyedNotification (uint32_t layerId)
 Called by Wayland listener when layer is destroyed.
 
void layerOpacityChangedNotification (uint32_t layerId, double opacity)
 Called by Wayland listener when layer opacity changes.
 
void layerSourceChangedNotification (uint32_t layerId, const windowing::Region &source)
 Called by Wayland listener when layer source rectangle changes.
 
void layerVisibilityChangedNotification (uint32_t layerId, int32_t visibility)
 Called by Wayland listener when layer visibility changes.
 
void modeChangeNotification (int32_t width, int32_t height, int32_t refresh) noexcept
 Called by Wayland when screen properties change.
 
void releaseLayer (uint32_t layerId) const noexcept
 Removes layer from the screen.
 
void releaseSurface (uint32_t surfaceId, uint32_t layerId) const
 Removes a surface from the specified layer.
 
void surfaceCreatedNotification (uint32_t surfaceId)
 Called by Wayland listener when surface has been created.
 
void surfaceDestinationChangedNotification (uint32_t surfaceId, const windowing::Region &destination)
 Called by Wayland listener when surface destination rectangle changes.
 
void surfaceDestroyedNotification (uint32_t surfaceId)
 Called by Wayland listener when surface is destroyed.
 
void surfaceOpacityChangedNotification (uint32_t surfaceId, double opacity)
 Called by Wayland listener when surface opacity changes.
 
void surfaceSourceChangedNotification (uint32_t surfaceId, const windowing::Region &source)
 Called by Wayland listener when surface source rectangle changes.
 
void surfaceVisibilityChangedNotification (uint32_t surfaceId, int32_t visibility)
 Called by Wayland listener when surface visibility changes.
 
void waitLayers (const WaylandDisplay &waylandDisplay) const
 Blocks until all layers are created by the compositor.
 
void waitSurfaces (const WaylandDisplay &waylandDisplay) const
 Blocks until all surfaces are created by the compositor.
 

Detailed Description

An abstraction class that allows to control IVI layers and surfaces.

Since
Kanzi 3.9.8
Kanzi 4.0.0 acts as a wrapper over IviWm and related interfaces, similar to how shells work.

Constructor & Destructor Documentation

◆ IviLayoutManager()

kanzi::wayland::IviLayoutManager::IviLayoutManager ( ivi_wm * iviWmNativeHandle,
const WaylandOutput & waylandOutput )
explicitnoexcept

Constructor.

Parameters
iviWmNativeHandleNative handle for IviWm interface.
waylandOutputAssociated WaylandOutput.
Since
Kanzi 4.0.0 accepts iviWmNativeHandle as a native handle instead of wrapper reference.

Member Function Documentation

◆ createLayer()

void kanzi::wayland::IviLayoutManager::createLayer ( const IviLayerProps & iviLayerProps)

Requests the compositor to create a layer.

Parameters
iviLayerPropsLayer ID.

◆ bindLayer()

void kanzi::wayland::IviLayoutManager::bindLayer ( uint32_t layerId) const
noexcept

Assigns a layer to the screen.

Kanzi assumes that there is a single screen.

Parameters
layerIdLayer ID.

◆ releaseLayer()

void kanzi::wayland::IviLayoutManager::releaseLayer ( uint32_t layerId) const
noexcept

Removes layer from the screen.

Kanzi assumes that there is a single screen.

Parameters
layerIdLayer ID.

◆ createSurface()

void kanzi::wayland::IviLayoutManager::createSurface ( const IviSurfaceProps & iviSurfaceProps)

Requests the compositor to create a surface.

Parameters
iviSurfacePropsProperties to use.

◆ bindSurface()

void kanzi::wayland::IviLayoutManager::bindSurface ( uint32_t surfaceId,
uint32_t layerId ) const

Assigns a surface to the specified layer.

Parameters
surfaceIdSurface ID.
layerIdLayer ID.

◆ releaseSurface()

void kanzi::wayland::IviLayoutManager::releaseSurface ( uint32_t surfaceId,
uint32_t layerId ) const

Removes a surface from the specified layer.

Parameters
surfaceIdSurface ID.
layerIdLayer ID.

◆ initializeLayer()

void kanzi::wayland::IviLayoutManager::initializeLayer ( const IviLayerProps & layerProps) const

Helper function to set up a layer for use.

Parameters
layerPropsProperties to use.

◆ initializeSurface()

void kanzi::wayland::IviLayoutManager::initializeSurface ( const IviSurfaceProps & surfaceProps) const

Helper function to set up a surface for use.

Parameters
surfacePropsProperties to use.

◆ configureLayer()

void kanzi::wayland::IviLayoutManager::configureLayer ( const IviLayerProps & layerProps) const

Helper function that requests the compositor to change surface state to match the provided properties.

Parameters
layerPropsProperties to use.

◆ configureSurface()

void kanzi::wayland::IviLayoutManager::configureSurface ( const IviSurfaceProps & surfaceProps) const

Helper function that will request compositor to change surface state to match supplied properties.

Parameters
surfacePropsProperties to use.

◆ waitLayers()

void kanzi::wayland::IviLayoutManager::waitLayers ( const WaylandDisplay & waylandDisplay) const

Blocks until all layers are created by the compositor.

Parameters
waylandDisplayAssociated WaylandDisplay.

◆ waitSurfaces()

void kanzi::wayland::IviLayoutManager::waitSurfaces ( const WaylandDisplay & waylandDisplay) const

Blocks until all surfaces are created by the compositor.

Parameters
waylandDisplayAssociated WaylandDisplay.

◆ layerCreatedNotification()

void kanzi::wayland::IviLayoutManager::layerCreatedNotification ( uint32_t layerId)

Called by Wayland listener when layer is created.

Parameters
layerIdLayer ID.

◆ layerVisibilityChangedNotification()

void kanzi::wayland::IviLayoutManager::layerVisibilityChangedNotification ( uint32_t layerId,
int32_t visibility )

Called by Wayland listener when layer visibility changes.

Parameters
layerIdLayer ID.
visibilityNew layer visibility.

◆ layerSourceChangedNotification()

void kanzi::wayland::IviLayoutManager::layerSourceChangedNotification ( uint32_t layerId,
const windowing::Region & source )

Called by Wayland listener when layer source rectangle changes.

Parameters
layerIdLayer ID.
sourceNew source rectangle.

◆ layerDestinationChangedNotification()

void kanzi::wayland::IviLayoutManager::layerDestinationChangedNotification ( uint32_t layerId,
const windowing::Region & destination )

Called by Wayland listener when layer destination rectangle changes.

Parameters
layerIdLayer ID.
destinationNew destination rectangle.

◆ layerOpacityChangedNotification()

void kanzi::wayland::IviLayoutManager::layerOpacityChangedNotification ( uint32_t layerId,
double opacity )

Called by Wayland listener when layer opacity changes.

Parameters
layerIdLayer ID.
opacityNew layer opacity.

◆ surfaceCreatedNotification()

void kanzi::wayland::IviLayoutManager::surfaceCreatedNotification ( uint32_t surfaceId)

Called by Wayland listener when surface has been created.

Parameters
surfaceIdSurface ID.

◆ surfaceVisibilityChangedNotification()

void kanzi::wayland::IviLayoutManager::surfaceVisibilityChangedNotification ( uint32_t surfaceId,
int32_t visibility )

Called by Wayland listener when surface visibility changes.

Parameters
surfaceIdSurface ID.
visibilityNew surface visibility.

◆ surfaceSourceChangedNotification()

void kanzi::wayland::IviLayoutManager::surfaceSourceChangedNotification ( uint32_t surfaceId,
const windowing::Region & source )

Called by Wayland listener when surface source rectangle changes.

Parameters
surfaceIdSurface ID.
sourceNew source rectangle.

◆ surfaceDestinationChangedNotification()

void kanzi::wayland::IviLayoutManager::surfaceDestinationChangedNotification ( uint32_t surfaceId,
const windowing::Region & destination )

Called by Wayland listener when surface destination rectangle changes.

Parameters
surfaceIdSurface ID.
destinationNew destination rectangle.

◆ surfaceOpacityChangedNotification()

void kanzi::wayland::IviLayoutManager::surfaceOpacityChangedNotification ( uint32_t surfaceId,
double opacity )

Called by Wayland listener when surface opacity changes.

Parameters
surfaceIdSurface ID.
opacityNew surface opacity.

◆ layerDestroyedNotification()

void kanzi::wayland::IviLayoutManager::layerDestroyedNotification ( uint32_t layerId)

Called by Wayland listener when layer is destroyed.

Parameters
layerIdLayer ID.

◆ surfaceDestroyedNotification()

void kanzi::wayland::IviLayoutManager::surfaceDestroyedNotification ( uint32_t surfaceId)

Called by Wayland listener when surface is destroyed.

Parameters
surfaceIdSurface ID.

◆ modeChangeNotification()

void kanzi::wayland::IviLayoutManager::modeChangeNotification ( int32_t width,
int32_t height,
int32_t refresh )
noexcept

Called by Wayland when screen properties change.

Parameters
widthNew screen width.
heightNew screen height.
refreshNew refresh rate (mHz).

◆ getResolution()

KZ_NO_DISCARD windowing::Size kanzi::wayland::IviLayoutManager::getResolution ( ) const
noexcept

Gets screen resolution.

Returns
Screen resolution.

◆ getLayerProps()

KZ_NO_DISCARD const IviLayerProps & kanzi::wayland::IviLayoutManager::getLayerProps ( uint32_t layerId) const
noexcept

Gets the internal layer state.

Parameters
layerIdLayer ID.
Returns
Internal layer state.

◆ getSurfaceProps()

KZ_NO_DISCARD const IviSurfaceProps & kanzi::wayland::IviLayoutManager::getSurfaceProps ( uint32_t surfaceId) const
noexcept

Gets the internal surface state.

Parameters
surfaceIdSurface ID.
Returns
Internal surface state.

◆ addListener() [1/2]

bool kanzi::wayland::IviLayoutManager::addListener ( ivi_wm_listener && listener,
void * data )
noexcept

Adds a listener to the underlying IviWm.

Parameters
listenerListener to attach.
dataData pointer to receive when the listener is called.
Returns
On success, true, otherwise false.
Since
Kanzi 4.0.0

◆ addListener() [2/2]

bool kanzi::wayland::IviLayoutManager::addListener ( ivi_wm_screen_listener && listener,
void * data )
noexcept

Adds a listener to the underlying IviScreen.

Parameters
listenerListener to attach.
dataData pointer to receive when the listener is called.
Returns
On success, true, otherwise false.
Since
Kanzi 4.0.0

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