forked from enlightenment/efl
ecore-wl2: Add API function to hide a window
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
02671a1a4b
commit
639a1a24ae
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue