Tizen Native API  7.0
Wayland Library Window Functions

Functions that deal with creating, destroying, or interacting with Wayland windows

Functions

Ecore_Wl2_Windowecore_wl2_window_new (Ecore_Wl2_Display *display, Ecore_Wl2_Window *parent, int x, int y, int w, int h)
 Create a new Ecore_Wl2_Window.
int ecore_wl2_window_id_get (Ecore_Wl2_Window *window)
 Get the window id associated with an Ecore_Wl2_Window.
void ecore_wl2_window_show (Ecore_Wl2_Window *window)
 Show a given Ecore_Wl2_Window.
void ecore_wl2_window_hide (Ecore_Wl2_Window *window)
 Hide a given Ecore_Wl2_Window.
void ecore_wl2_window_free (Ecore_Wl2_Window *window)
 Free a given Ecore_Wl2_Window.
void ecore_wl2_window_raise (Ecore_Wl2_Window *window)
 Raise a given Ecore_Wl2_Window.
void ecore_wl2_window_lower (Ecore_Wl2_Window *window)
 Lower the target window.
void ecore_wl2_window_activate (Ecore_Wl2_Window *window)
 Activate the target window.
void ecore_wl2_window_buffer_attach (Ecore_Wl2_Window *win, void *buffer, int x, int y, Eina_Bool implicit)
 Attach a buffer to a window.
void ecore_wl2_window_damage (Ecore_Wl2_Window *window, Eina_Rectangle *rects, unsigned int count)
 Specifies the area of the window's surface that needs updating internally calling wl_surface_damage.
Eina_Bool ecore_wl2_window_alpha_get (Ecore_Wl2_Window *window)
 Get if a given window is alpha.
void ecore_wl2_window_alpha_set (Ecore_Wl2_Window *window, Eina_Bool alpha)
 Set a given window's alpha property.
void ecore_wl2_window_title_set (Ecore_Wl2_Window *window, const char *title)
 Set the title of a given window.
const char * ecore_wl2_window_title_get (Ecore_Wl2_Window *window)
 Get the title of a given window.
Ecore_Wl2_Displayecore_wl2_window_display_get (const Ecore_Wl2_Window *window)
 Get which display a given window is using.
void ecore_wl2_window_focus_skip_set (Ecore_Wl2_Window *window, Eina_Bool focus_skip)
 Set if this window should ignore focus requests.
Eina_Bool ecore_wl2_window_focus_skip_get (Ecore_Wl2_Window *window)
 Get if this window ignores focus requests.
void ecore_wl2_window_video_has (Ecore_Wl2_Window *window, Eina_Bool has)
 Register the tizen protocol to provide video through the window's surface.
void ecore_wl2_window_commit (Ecore_Wl2_Window *window, Eina_Bool flush)
 Commit the surface of a wayland window.
Ecore_Wl2_Frame_Cb_Handle * ecore_wl2_window_frame_callback_add (Ecore_Wl2_Window *window, Ecore_Wl2_Frame_Cb cb, void *data)
 Add a callback that fires when the window's surface_frame callback fires.
void ecore_wl2_window_frame_callback_del (Ecore_Wl2_Frame_Cb_Handle *handle)
 Delete a callback that fires when the window's surface_frame callback fires.
Eina_Bool ecore_wl2_window_keygrab_set (Ecore_Wl2_Window *win, const char *key, int mod, int not_mod, int priority, Ecore_Wl2_Window_Keygrab_Mode grab_mode)
 Sets keygrab value of the window.
Eina_Bool ecore_wl2_window_keygrab_unset (Ecore_Wl2_Window *win, const char *key, int mod, int any_mod)
 Unsets keygrab value of the window.
Eina_Listecore_wl2_window_keygrab_list_set (Ecore_Wl2_Window *win, Eina_List *infos)
 Sets keygrab values of the window.
Eina_Listecore_wl2_window_keygrab_list_unset (Ecore_Wl2_Window *win, Eina_List *infos)
 Unsets keygrab values of the window.
Ecore_Wl2_Egl_Windowecore_wl2_egl_window_create (Ecore_Wl2_Window *window, int w, int h)
 Creates wl_egl_window.
void ecore_wl2_egl_window_destroy (Ecore_Wl2_Egl_Window *egl_win)
 Destroy a given Ecore_Wl2_Egl_Window.
void * ecore_wl2_egl_window_native_get (Ecore_Wl2_Egl_Window *egl_win)
 Gets the wl_egl_window that this ecore_wl2_egl_window is using.
void ecore_wl2_egl_window_resize_with_rotation (Ecore_Wl2_Egl_Window *egl_win, int dx, int dy, int w, int h, int rotation)
 Ecore_Wl2_Egl_Window resize with rotation.
void * ecore_wl2_window_native_surface_get (Ecore_Wl2_Window *window)
 Get the native surface(wl_surface) which belongs to this window.
Eina_Bool ecore_wl2_window_video_surface_create (Ecore_Wl2_Window *win)
 Create a video surface for a given window.
void * ecore_wl2_window_video_surface_get (Ecore_Wl2_Window *win)
 Get video surface for a given window.
Eina_Bool ecore_wl2_window_video_surface_destroy (Ecore_Wl2_Window *win)
 Destroy a video surface for a given window.
Eina_Bool ecore_wl2_window_video_surface_sync_set (Ecore_Wl2_Window *win, Eina_Bool sync)
 Set video surface for a given window to synchronized mode the default commit behaviour is synchronized mode.
Eina_Bool ecore_wl2_window_video_surface_destination_set (Ecore_Wl2_Window *win, int x, int y, int w, int h)
 Set destination area of video surface for a given window.
int ecore_wl2_window_render_sync_fd_create (Ecore_Wl2_Window *win, Ecore_Wl2_Window_Render_Sync_Type sync_type)
 Create a file descriptor for rendering sync for a given window.

Typedefs

typedef enum
_Ecore_Wl2_Window_Render_Sync_Type 
Ecore_Wl2_Window_Render_Sync_Type
 Defines the types to create a file descriptor which is used for informing render event on the native surface.

Typedef Documentation

Defines the types to create a file descriptor which is used for informing render event on the native surface.

See also:
ecore_wl2_window_render_sync_fd_create
Since :
6.0

Enumeration Type Documentation

Defines the types to create a file descriptor which is used for informing render event on the native surface.

See also:
ecore_wl2_window_render_sync_fd_create
Since :
6.0
Enumerator:
ECORE_WL2_WINDOW_RENDER_SYNC_COMMIT 

To get commit event emitted after calling wl_surface_commit

ECORE_WL2_WINDOW_RENDER_SYNC_PRESENT 

To get presentation event emitted after the compositor draws


Function Documentation

Creates wl_egl_window.

Create wl_egl_window through the connected wl_surface of ecore_wl2_window.

Parameters:
windowThe Ecore_Wl2_Window
wThe width of wl_egl_window
hThe height of wl_egl_window
Returns:
The newly created Ecore_Wl2_Egl_Window
Since :
6.0

Destroy a given Ecore_Wl2_Egl_Window.

Parameters:
egl_winThe Ecore_Wl2_Egl_Window to destroy
Since :
6.0

Gets the wl_egl_window that this ecore_wl2_egl_window is using.

Cast the wl_egl_window struct pointer not included in the Managed API to void pointer This pointer can be used as an argument to the function passed to wl_egl_window.

Parameters:
egl_winThe Ecore_Wl2_Egl_Window
Returns:
The wl_egl_window, it provided as void type
Since :
6.0
void ecore_wl2_egl_window_resize_with_rotation ( Ecore_Wl2_Egl_Window egl_win,
int  dx,
int  dy,
int  w,
int  h,
int  rotation 
)

Ecore_Wl2_Egl_Window resize with rotation.

Parameters:
egl_winThe Ecore_Wl2_Egl_Window
dxThe x coord resize
dyThe y coord resize
wThe width of Ecore_Wl2_Egl_Window
hThe height of Ecore_Wl2_Egl_Window
rotationThe angle of rotation
Since :
6.0

Activate the target window.

Parameters:
windowThe target window
Since :
6.0

Get if a given window is alpha.

Parameters:
windowThe window to get if is alpha
Returns:
EINA_TRUE if window is alpha, EINA_FALSE otherwise
Since (EFL) :
1.17
Since :
6.0
void ecore_wl2_window_alpha_set ( Ecore_Wl2_Window window,
Eina_Bool  alpha 
)

Set a given window's alpha property.

Parameters:
windowThe window on which to set the alpha property
alphaEINA_TRUE to set window as alpha, EINA_FALSE otherwise
Since (EFL) :
1.17
Since :
6.0
void ecore_wl2_window_buffer_attach ( Ecore_Wl2_Window win,
void *  buffer,
int  x,
int  y,
Eina_Bool  implicit 
)

Attach a buffer to a window.

Note that the GL stack my attach buffers to a surface - we should call this function at that time (with a NULL buffer) to track whether a surface has a valid buffer. That is, call with implicit true and buffer NULL at the time of glSwapBuffers.

Parameters:
windowThe target window
bufferThe buffer to attach
xX offset from corner
yY offset from corner
implicitTrue if an external library is doing the actual attaching
Since (EFL) :
1.21
Since :
6.0
void ecore_wl2_window_commit ( Ecore_Wl2_Window window,
Eina_Bool  flush 
)

Commit the surface of a wayland window.

If flush is set this generates a wl_surface_commit(), otherwise it is expected that some other call in the very near future (such as eglSwapBuffers) will cause an implicit flush.

A surface that has been commit will be in the "pending" state until the compositor tells us it's time to draw again via a frame callback.

Parameters:
windowThe window whose surface we want to commit
flushEINA_TRUE if we need to flush immediately.
Since (EFL) :
1.21
Since :
6.0
void ecore_wl2_window_damage ( Ecore_Wl2_Window window,
Eina_Rectangle rects,
unsigned int  count 
)

Specifies the area of the window's surface that needs updating internally calling wl_surface_damage.

Parameters:
windowThe target window
rectsThe rect area that will cause damage
countThe number of rects
Since :
6.0

Get which display a given window is using.

Parameters:
windowThe window to get the display of
Returns:
The Ecore_Wl2_Display that this window is using, or NULL otherwise
Since (EFL) :
1.17
Since :
6.0

Get if this window ignores focus requests.

Parameters:
windowThe window to get the focus skip value from
Returns:
EINA_TRUE if a window should skip focus requests, EINA_FALSE otherwise
Since (EFL) :
1.20
Since :
6.0
void ecore_wl2_window_focus_skip_set ( Ecore_Wl2_Window window,
Eina_Bool  focus_skip 
)

Set if this window should ignore focus requests.

Parameters:
windowThe window to set ignore focus requests on
focus_skipEINA_TRUE if this window should skip focus requests, EINA_FALSE otherwise
Since (EFL) :
1.20
Since :
6.0
Ecore_Wl2_Frame_Cb_Handle* ecore_wl2_window_frame_callback_add ( Ecore_Wl2_Window window,
Ecore_Wl2_Frame_Cb  cb,
void *  data 
)

Add a callback that fires when the window's surface_frame callback fires.

Parameters:
windowThe window to add a callback on
cbThe callback
dataUser data to provide to the callback handler
Returns:
The Ecore_Wl2_Frame_Cb_Handle
See also:
ecore_wl2_window_frame_callback_del
Since (EFL) :
1.21
Since :
6.0
void ecore_wl2_window_frame_callback_del ( Ecore_Wl2_Frame_Cb_Handle *  handle)

Delete a callback that fires when the window's surface_frame callback fires.

Parameters:
handleThe callback handle obtained through ecore_wl2_window_frame_callback_add().
Since (EFL) :
1.21
Since :
6.0

Free a given Ecore_Wl2_Window.

Parameters:
windowThe Ecore_Wl2_Window to free
Since (EFL) :
1.17
Since :
6.0

Hide a given Ecore_Wl2_Window.

Parameters:
windowThe Ecore_Wl2_Window to hide
Since (EFL) :
1.17
Since :
6.0

Get the window id associated with an Ecore_Wl2_Window.

Parameters:
windowThe Ecore_Wl2_Window of which to retrieve the window id
Returns:
The id associated with this window
Since (EFL) :
1.17
Since :
6.0

Sets keygrab values of the window.

Warning:
This is not for use by third-party applications.
third-party application can use ECORE_WL2_WINDOW_KEYGRAB_TOPMOST mode without keygrab privilege. don't use other modes. those are not for third-party application.

The returned list should be freed with eina_list_free() when you no longer need it.

Privilege Level:
platform
Privilege:
http://tizen.org/privilege/keygrab
Parameters:
winThe window
infosThe list of keys and grab modes for setting keygrab
Returns:
NULL, or the list of keys being failed keygrab set.
Exceptions:
TIZEN_ERROR_NONESuccessfully set
TIZEN_ERROR_INVALID_PARAMETERInvalid parameter has given
TIZEN_ERROR_PERMISSION_DENIEDPrivilege permission denied

Ecore_Wl2_Window_Keygrab_Info *info = malloc(sizeof(Ecore_Wl2_Window_Keygrab_Info)); info->key = "XF86AudioLowerVolume"; info->mode = ECORE_WL2_WINDOW_KEYGRAB_TOPMOST; infos = eina_list_append(infos, info);

ecore_wl2_window_keygrab_list_set(win, infos);

Since :
6.0

Unsets keygrab values of the window.

Warning:
This is not for use by third-party applications.
third-party application can use ECORE_WL2_WINDOW_KEYGRAB_TOPMOST mode without keygrab privilege. don't use other modes. those are not for third-party application.

The returned list should be freed with eina_list_free() when you no longer need it.

Privilege Level:
platform
Privilege:
http://tizen.org/privilege/keygrab
Parameters:
winThe window
infosThe list of infos for unsetting keygrab
Returns:
NULL, or the list of keys being failed keygrab unset.
Exceptions:
TIZEN_ERROR_NONESuccessfully set
TIZEN_ERROR_INVALID_PARAMETERInvalid parameter has given
TIZEN_ERROR_PERMISSION_DENIEDPrivilege permission denied

Ecore_Wl2_Window_Keygrab_Info *info = malloc(sizeof(Ecore_Wl2_Window_Keygrab_Info)); info->key = "XF86AudioLowerVolume"; infos = eina_list_append(infos, info);

ecore_wl2_window_keygrab_list_unset(win, infos);

Since :
6.0
Eina_Bool ecore_wl2_window_keygrab_set ( Ecore_Wl2_Window win,
const char *  key,
int  mod,
int  not_mod,
int  priority,
Ecore_Wl2_Window_Keygrab_Mode  grab_mode 
)

Sets keygrab value of the window.

Warning:
This is not for use by third-party applications.
third-party application can use ECORE_WL2_WINDOW_KEYGRAB_TOPMOST mode without keygrab privilege. don't use other modes. those are not for third-party application.

This function grabs the key of window using grab_mode

Privilege Level:
platform
Privilege:
http://tizen.org/privilege/keygrab
Parameters:
winThe target Ecore_Wl2_Window
keyThe string is the keyname to grab
modA combination of modifier keys that must be present to trigger the event. Not supported yet
not_modA combination of modifier keys that must not be present to trigger the event. Not supported yet
priorityNot supported yet
grab_modeDescribes how the key should be grabbed, wrt. focus and stacking
Returns:
true on success, false otherwise
Exceptions:
TIZEN_ERROR_NONESuccessfully set
TIZEN_ERROR_INVALID_PARAMETERInvalid parameter has given
TIZEN_ERROR_ALREADY_IN_PROGRESSThe key already has been grabbed
TIZEN_ERROR_PERMISSION_DENIEDPrivilege permission denied
Since :
6.0
Eina_Bool ecore_wl2_window_keygrab_unset ( Ecore_Wl2_Window win,
const char *  key,
int  mod,
int  any_mod 
)

Unsets keygrab value of the window.

Warning:
This is not for use by third-party applications.
third-party application can use ECORE_WL2_WINDOW_KEYGRAB_TOPMOST mode without keygrab privilege. don't use other modes. those are not for third-party application.

This function unset keygrab value. Ungrab key of window.

Privilege Level:
platform
Privilege:
http://tizen.org/privilege/keygrab
Parameters:
winThe target Ecore_Wl2_Window
keyThe string is the keyname to grab
modA combination of modifier keys that must be present to trigger the event. Not supported yet
not_modA combination of modifier keys that must not be present to trigger the event. Not supported yet
Returns:
true on success, false otherwise
Exceptions:
TIZEN_ERROR_NONESuccessfully set
TIZEN_ERROR_INVALID_PARAMETERInvalid parameter has given
TIZEN_ERROR_ALREADY_IN_PROGRESSThe key already has been grabbed
TIZEN_ERROR_PERMISSION_DENIEDPrivilege permission denied
Since :
6.0

Lower the target window.

Note:
This API call causes the ECORE_WL2_EVENT_WINDOW_LOWER event
Parameters:
windowThe target window
Since :
6.0

Get the native surface(wl_surface) which belongs to this window.

Note:
The native wl_surface struct is not included in the managed API list and is provided as a void pointer
Parameters:
windowThe Ecore_Wl2_Window to get the surface of
Returns:
The wl_surface associated with this window It provided as void type
Since :
6.0
Ecore_Wl2_Window* ecore_wl2_window_new ( Ecore_Wl2_Display display,
Ecore_Wl2_Window parent,
int  x,
int  y,
int  w,
int  h 
)

Create a new Ecore_Wl2_Window.

Parameters:
displayThe Ecore_Wl2_Display on which to create this new window
parentThe Ecore_Wl2_Window which is the parent of this window
xInitial x position of window
yInitial y position of window
wInitial width of window
hInitial height of window
Returns:
The Ecore_Wl2_Window that newly creating, or NULL failure
Since (EFL) :
1.17
Since :
6.0

Raise a given Ecore_Wl2_Window.

Parameters:
windowThe Ecore_Wl2_Window which to raise
Since (EFL) :
1.17
Since :
6.0

Create a file descriptor for rendering sync for a given window.

Parameters:
winThe window to create a file descriptor for rendering sync
sync_typeThe one of Ecore_Wl2_Window_Render_Sync_Type to create a file descriptor
Returns:
The file descriptor. It must be closed manually by the caller using `close`
Since :
6.0

Show a given Ecore_Wl2_Window.

Parameters:
windowThe Ecore_Wl2_Window to show
Since (EFL) :
1.17
Since :
6.0
const char* ecore_wl2_window_title_get ( Ecore_Wl2_Window window)

Get the title of a given window.

Parameters:
windowThe window to set the title of
Returns:
A string if found, or NULL otherwise
Since (EFL) :
1.24
Since :
6.0
void ecore_wl2_window_title_set ( Ecore_Wl2_Window window,
const char *  title 
)

Set the title of a given window.

Parameters:
windowThe window to set the title of
titleThe title of the window
Since (EFL) :
1.17
Since :
6.0

Register the tizen protocol to provide video through the window's surface.

Parameters:
windowThe target window
hasEINA_TRUE to set window has video, EINA_FALSE otherwise
Since :
6.0

Create a video surface for a given window.

Parameters:
winThe window to create a video surface
Returns:
EINA_TRUE on success, EINA_FALSE otherwise
Since :
6.0
Eina_Bool ecore_wl2_window_video_surface_destination_set ( Ecore_Wl2_Window win,
int  x,
int  y,
int  w,
int  h 
)

Set destination area of video surface for a given window.

Parameters:
winThe window 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

Destroy a video surface for a given window.

Parameters:
winThe window to destroy a video surface
Returns:
EINA_TRUE on success, EINA_FALSE otherwise
Since :
6.0

Get video surface for a given window.

Parameters:
winThe window to get video surface
Returns:
The wl_surface which is used by this window as a video surface It provided as void type
Since :
6.0

Set video surface for a given window to synchronized mode the default commit behaviour is synchronized mode.

Parameters:
winThe window to set video surface to synchronized mode
syncEINA_TRUE to set video surface to synchronized mode, EINA_FALSE to set video surface to desynchronized mode
Returns:
EINA_TRUE on success, EINA_FALSE otherwise
Since :
6.0