ecore-wl2: Add API function to hide a window

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

View File

@ -265,6 +265,15 @@ EAPI struct wl_surface *ecore_wl2_window_surface_get(Ecore_Wl2_Window *window);
*/
EAPI void ecore_wl2_window_show(Ecore_Wl2_Window *window);
/**
* Hide a given Ecore_Wl2_Window
*
* @param window The Ecore_Wl2_Window to hide
*
* @ingroup Ecore_Wl2_Window_Group
*/
EAPI void ecore_wl2_window_hide(Ecore_Wl2_Window *window);
/* # ifdef __cplusplus */
/* } */
/* # endif */

View File

@ -263,3 +263,22 @@ ecore_wl2_window_show(Ecore_Wl2_Window *window)
surf_err:
ERR("Failed to create surface for window: %m");
}
EAPI void
ecore_wl2_window_hide(Ecore_Wl2_Window *window)
{
EINA_SAFETY_ON_NULL_RETURN(window);
if (window->xdg_surface) xdg_surface_destroy(window->xdg_surface);
window->xdg_surface = NULL;
if (window->xdg_popup) xdg_popup_destroy(window->xdg_popup);
window->xdg_popup = NULL;
if (window->wl_shell_surface)
wl_shell_surface_destroy(window->wl_shell_surface);
window->wl_shell_surface = NULL;
if (window->surface) wl_surface_destroy(window->surface);
window->surface = NULL;
}