ecore-wl2: Add API function to set window title

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-09-28 09:47:59 -04:00
parent f372d11f99
commit 41a74fda94
2 changed files with 17 additions and 0 deletions

View File

@ -403,6 +403,9 @@ EAPI Eina_Bool ecore_wl2_window_fullscreen_get(Ecore_Wl2_Window *window);
/* TODO: doxy */
EAPI void ecore_wl2_window_rotation_set(Ecore_Wl2_Window *window, int rotation);
/* TODO: doxy */
EAPI void ecore_wl2_window_title_set(Ecore_Wl2_Window *window, const char *title);
/* # ifdef __cplusplus */
/* } */
/* # endif */

View File

@ -611,3 +611,17 @@ ecore_wl2_window_rotation_set(Ecore_Wl2_Window *window, int rotation)
window->rotation = rotation;
}
EAPI void
ecore_wl2_window_title_set(Ecore_Wl2_Window *window, const char *title)
{
EINA_SAFETY_ON_NULL_RETURN(window);
eina_stringshare_replace(&window->title, title);
if (!window->title) return;
if (window->xdg_surface)
xdg_surface_set_title(window->xdg_surface, window->title);
else if (window->wl_shell_surface)
wl_shell_surface_set_title(window->wl_shell_surface, window->title);
}