ecore-wl2: Add API function to free a window

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-09-09 12:12:53 -04:00
parent 639a1a24ae
commit a5739c5ded
2 changed files with 26 additions and 0 deletions

View File

@ -274,6 +274,15 @@ EAPI void ecore_wl2_window_show(Ecore_Wl2_Window *window);
*/
EAPI void ecore_wl2_window_hide(Ecore_Wl2_Window *window);
/**
* Free a given Ecore_Wl2_Window
*
* @param window The Ecore_Wl2_Window to free
*
* @ingroup Ecore_Wl2_Window_Group
*/
EAPI void ecore_wl2_window_free(Ecore_Wl2_Window *window);
/* # ifdef __cplusplus */
/* } */
/* # endif */

View File

@ -282,3 +282,20 @@ ecore_wl2_window_hide(Ecore_Wl2_Window *window)
if (window->surface) wl_surface_destroy(window->surface);
window->surface = NULL;
}
EAPI void
ecore_wl2_window_free(Ecore_Wl2_Window *window)
{
EINA_SAFETY_ON_NULL_RETURN(window);
/* TODO: reset input pointer and keyboard focus */
/* TODO: delete window anim callback */
/* TODO: destroy subsurfaces */
ecore_wl2_window_hide(window);
if (window->title) eina_stringshare_del(window->title);
if (window->class) eina_stringshare_del(window->class);
free(window);
}