Tizen Native API  6.5
Functions to manipulate subsurfaces.

Functions to manipulate wayland subsurfaces, using Ecore_Wl2_Subsurface.

This API is intended to expose Wayland subsurface functionality, although it should not be necessary for most applications to use it, as soon as we have means to make Evas automatically switch Evas images to use subsurfaces.

It can/should be used, for instance, when subsurfaces are needed to be not in sync with the main window surface.

Functions

Ecore_Wl2_Subsurfaceecore_wl2_subsurface_new (Ecore_Wl2_Window *window)
 Create and return a new subsurface.
void ecore_wl2_subsurface_del (Ecore_Wl2_Subsurface *subsurface)
 Destroy the given subsurface, as well as the surface associated with it.
void ecore_wl2_subsurface_sync_set (Ecore_Wl2_Subsurface *subsurface, Eina_Bool sync)
 Enables or disables sub-surface synchronization.
void * ecore_wl2_subsurface_native_surface_get (Ecore_Wl2_Subsurface *subsurface)
 Get the wl_surface for this subsurface.
Ecore_Wl2_Windowecore_wl2_subsurface_window_get (Ecore_Wl2_Subsurface *subsurface)
 Get parent window for this subsurface.
void ecore_wl2_subsurface_place_surface_above (Ecore_Wl2_Subsurface *subsurface, Ecore_Wl2_Subsurface *other)
 Place subsurface on layer above a reference subsurface.
void ecore_wl2_subsurface_place_surface_below (Ecore_Wl2_Subsurface *subsurface, Ecore_Wl2_Subsurface *other)
 Place subsurface on layer below a reference subsurface.
Eina_Bool ecore_wl2_subsurface_video_surface_prepare (Ecore_Wl2_Subsurface *subsurface)
 Prepare video surface for a given subsurface.
Eina_Bool ecore_wl2_subsurface_video_surface_destination_set (Ecore_Wl2_Subsurface *subsurface, int x, int y, int w, int h)
 Set destination area of video surface for a given subsurface.
Eina_Bool ecore_wl2_subsurface_video_surface_rotation_set (Ecore_Wl2_Subsurface *subsurface, Ecore_Wl2_Subsurface_Rotation rotation)
 Set video surface rotation for a given subsurface.
void ecore_wl2_subsurface_aux_hint_set (Ecore_Wl2_Subsurface *subsurface, const char *hint, const char *val)
 Set an auxiliary hint on a given subsurface.
Eina_Bool ecore_wl2_subsurface_export (Ecore_Wl2_Subsurface *subsurface)
 Export given subsurface.
const char * ecore_wl2_subsurface_exported_surface_handle_get (Ecore_Wl2_Subsurface *subsurface)
 Get exported surface handle for a given subsurface.
void ecore_wl2_subsurface_exported_surface_show (Ecore_Wl2_Subsurface *subsurface)
 Show exported surface for a given subsurface.
void ecore_wl2_subsurface_exported_surface_hide (Ecore_Wl2_Subsurface *subsurface)
 Hide exported surface for a given subsurface.
void ecore_wl2_subsurface_exported_surface_place_above (Ecore_Wl2_Subsurface *subsurface, Ecore_Wl2_Subsurface *other)
 Place exported surface for a given subsurface on layer above a reference subsurface.
void ecore_wl2_subsurface_exported_surface_place_below (Ecore_Wl2_Subsurface *subsurface, Ecore_Wl2_Subsurface *other)
 Place exported surface for a given subsurface on layer below a reference subsurface.
void ecore_wl2_subsurface_exported_surface_move (Ecore_Wl2_Subsurface *subsurface, int x, int y)
 Set position of exported surface for a given subsurface.
void ecore_wl2_subsurface_exported_surface_resize (Ecore_Wl2_Subsurface *subsurface, int w, int h)
 Set size of exported surface for a given subsurface.
void ecore_wl2_subsurface_exported_surface_transform_set (Ecore_Wl2_Subsurface *subsurface, int transform)
 Set transform of exported surface for a given subsurface.
void ecore_wl2_subsurface_exported_surface_sync_set (Ecore_Wl2_Subsurface *subsurface, Eina_Bool sync)
 Enables or disables exported surface synchronization for a given subsurface the default commit behaviour is synchronized mode.
void ecore_wl2_subsurface_exported_surface_commit (Ecore_Wl2_Subsurface *subsurface)
 Commit exported surface for a given subsurface.

Typedefs

typedef enum
_Ecore_Wl2_Subsurface_Rotation 
Ecore_Wl2_Subsurface_Rotation
 Defines the rotation types of video surface.

Typedef Documentation

Defines the rotation types of video surface.

See also:
ecore_wl2_subsurface_video_surface_rotation_set
Since :
6.0

Enumeration Type Documentation

Defines the rotation types of video surface.

See also:
ecore_wl2_subsurface_video_surface_rotation_set
Since :
6.0
Enumerator:
ECORE_WL2_SUBSURFACE_ROTATION_NORMAL 

No rotation

ECORE_WL2_SUBSURFACE_ROTATION_90 

90 degree counter-clockwise

ECORE_WL2_SUBSURFACE_ROTATION_180 

180 degree counter-clockwise

ECORE_WL2_SUBSURFACE_ROTATION_270 

270 degree counter-clockwise

ECORE_WL2_SUBSURFACE_ROTATION_FLIPPED 

180 degree flip around a vertical axis

ECORE_WL2_SUBSURFACE_ROTATION_FLIPPED_90 

Flip and rotate 90 degree counter-clockwise

ECORE_WL2_SUBSURFACE_ROTATION_FLIPPED_180 

Flip and rotate 180 degree counter-clockwise

ECORE_WL2_SUBSURFACE_ROTATION_FLIPPED_270 

Flip and rotate 270 degree counter-clockwise


Function Documentation

void ecore_wl2_subsurface_aux_hint_set ( Ecore_Wl2_Subsurface subsurface,
const char *  hint,
const char *  val 
)

Set an auxiliary hint on a given subsurface.

Parameters:
subsurfaceThe subsurface to set an auxiliary hint
hintThe auxiliary hint string
valThe value string
Since :
6.0

Destroy the given subsurface, as well as the surface associated with it.

Parameters:
subsurfacethe subsurface
Since (EFL) :
1.17
Since :
6.0

Export given subsurface.

Parameters:
subsurfaceThe subsurface to export
Since :
6.5

Commit exported surface for a given subsurface.

This generates a wl_surface_commit() immediately

Parameters:
subsurfacethe subsurface
Since :
6.5

Get exported surface handle for a given subsurface.

Parameters:
subsurfaceThe subsurface to get exported surface handle
Since :
6.5

Hide exported surface for a given subsurface.

Parameters:
subsurfaceThe subsurface to hide exported surface
Note:
This change won't be applied unless parent wl_surface.commit, if commit behaviour is synchronized mode which can be changed by ecore_wl2_subsurface_exported_surface_sync_set
See also:
ecore_wl2_subsurface_exported_surface_commit
Since :
6.5
void ecore_wl2_subsurface_exported_surface_move ( Ecore_Wl2_Subsurface subsurface,
int  x,
int  y 
)

Set position of exported surface for a given subsurface.

Parameters:
subsurfacethe subsurface
xX position of exported surface
yY position of exported surface
Note:
This change won't be applied unless parent wl_surface.commit, if commit behaviour is synchronized mode which can be changed by ecore_wl2_subsurface_exported_surface_sync_set
See also:
ecore_wl2_subsurface_exported_surface_commit
Since :
6.5

Place exported surface for a given subsurface on layer above a reference subsurface.

Parameters:
subsurfacethe subsurface
otherthe sibling reference subsurface, or NULL for parent surface
See also:
ecore_wl2_subsurface_place_surface_above
Note:
Make sure that parent wl_surface.commit. This change won't be applied unless parent wl_surface.commit.
Since :
6.5

Place exported surface for a given subsurface on layer below a reference subsurface.

Parameters:
subsurfacethe subsurface
otherthe sibling reference subsurface, or NULL for parent surface
See also:
ecore_wl2_subsurface_place_surface_above
Note:
Make sure that parent wl_surface.commit. This change won't be applied unless parent wl_surface.commit.
Since :
6.5
void ecore_wl2_subsurface_exported_surface_resize ( Ecore_Wl2_Subsurface subsurface,
int  w,
int  h 
)

Set size of exported surface for a given subsurface.

Parameters:
subsurfacethe subsurface
wWidth of exported surface
hHeight of exported surface
Note:
This change won't be applied unless parent wl_surface.commit, if commit behaviour is synchronized mode which can be changed by ecore_wl2_subsurface_exported_surface_sync_set
See also:
ecore_wl2_subsurface_exported_surface_commit
Since :
6.5

Show exported surface for a given subsurface.

Parameters:
subsurfaceThe subsurface to show exported surface
Note:
This change won't be applied unless parent wl_surface.commit, if commit behaviour is synchronized mode which can be changed by ecore_wl2_subsurface_exported_surface_sync_set
See also:
ecore_wl2_subsurface_exported_surface_commit
Since :
6.5

Enables or disables exported surface synchronization for a given subsurface the default commit behaviour is synchronized mode.

Parameters:
subsurfacethe subsurface
synctrue to enable synchronization, false to desynchronize
See also:
ecore_wl2_subsurface_sync_set
Since :
6.5

Set transform of exported surface for a given subsurface.

Parameters:
subsurfacethe subsurface
transformThe exported surface transform being requested The available values of transform are:
  • 0 - no transform (WTZ_EXPORTED_SHELL_TRANSFORM_NORMAL)
  • 1 - 90 degrees clockwise (WTZ_EXPORTED_SHELL_TRANSFORM_90)
  • 2 - 180 degrees clockwise (WTZ_EXPORTED_SHELL_TRANSFORM_180)
  • 3 - 270 degrees clockwise (WTZ_EXPORTED_SHELL_TRANSFORM_270)
Note:
This change won't be applied unless parent wl_surface.commit, if commit behaviour is synchronized mode which can be changed by ecore_wl2_subsurface_exported_surface_sync_set
See also:
ecore_wl2_subsurface_exported_surface_commit
Since :
6.5

Get the wl_surface for this subsurface.

Parameters:
subsurfacethe subsurface
Returns:
the wl_surface associated with this subsurface, or NULL on failure, provided as void type
Since :
6.0

Create and return a new subsurface.

Create a new surface (and subsurface interface), with the parent surface being the one associated with the given window.

Parameters:
windowThe window. It must be visible, otherwise there will be no surface created for it yet.
Returns:
the allocated and initialized Ecore_Wl2_Subsurface object, or NULL on failure
Since (EFL) :
1.17
Since :
6.0

Place subsurface on layer above a reference subsurface.

Moves the subsurface to just above the reference subsurface, changing the z-order. The reference subsurface must be either a sibling or parent surface, else a protocol error will be generated.

Parameters:
subsurfacethe subsurface
otherthe sibling reference subsurface, or NULL for parent surface
Since :
6.0

Place subsurface on layer below a reference subsurface.

See ecore_wl2_subsurface_place_surface_above.

Parameters:
subsurfacethe subsurface
otherthe sibling reference subsurface, or NULL for parent surface
Since :
6.0

Enables or disables sub-surface synchronization.

When synchronization is enabled, surface commits on the subsurface will be cached and only applied when the parent surface's state is applied. This ensures atomic updates of the parent and all of its synchronized sub-surfaces.

When synchronization is disabled, commits will apply to the pending state directly without caching, just like a normal wl_surface. If there are already cached events when this is set, those events are applied simultaneously with the desync event.

Attempting to enable synchronization when the subsurface already thinks it's sync'd, or desync when it believes its desync'd, will be trivially ignored and will not generate a Wayland event.

See Wayland's set_desync documentation for further details and exceptional cases.

Parameters:
subsurfacethe subsurface
synctrue to enable synchronization, false to desynchronize
Since (EFL) :
1.17
Since :
6.0
Eina_Bool ecore_wl2_subsurface_video_surface_destination_set ( Ecore_Wl2_Subsurface subsurface,
int  x,
int  y,
int  w,
int  h 
)

Set destination area of video surface for a given subsurface.

Parameters:
subsurfaceThe subsurface to set destination area of video surface
xX position of destination area
yY position of destination area
wWidth of destination area
hHeight of destination area
Returns:
EINA_TRUE on success, EINA_FALSE otherwise
Since :
6.0

Prepare video surface for a given subsurface.

Parameters:
subsurfaceThe subsurface to prepare video surface
Returns:
EINA_TRUE on success, EINA_FALSE otherwise
Since :
6.0

Set video surface rotation for a given subsurface.

Parameters:
subsurfaceThe subsurface to set video surface rotation
rotationThe rotation type to set video surface rotation
Returns:
EINA_TRUE on success, EINA_FALSE otherwise
Since :
6.0

Get parent window for this subsurface.

Parameters:
subsurfacethe subsurface
Returns:
the Ecore_Wl2_Window associated with this subsurface, or NULL on failure.
Since :
6.5