From: Chris Michael Date: Thu, 20 Aug 2015 14:22:03 +0000 (-0400) Subject: ecore-wl2: Add API function for servers to destroy a wayland display X-Git-Tag: upstream/1.20.0~8008^2~236 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a079b102243a059d7b3b7b6be70f7dacae0663cf;p=platform%2Fupstream%2Fefl.git ecore-wl2: Add API function for servers to destroy a wayland display Signed-off-by: Chris Michael --- diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 0ae3f8d..d54d4bb1 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -115,6 +115,18 @@ EAPI int ecore_wl2_shutdown(void); EAPI Ecore_Wl2_Display *ecore_wl2_display_create(const char *name); /** + * Destroy an existing Wayland display + * + * @brief This function is typically used by servers to terminate an + * existing Wayland display. + * + * @param display The display to terminate + * + * @ingroup Ecore_Wl2_Display_Group + */ +EAPI void ecore_wl2_display_destroy(Ecore_Wl2_Display *display); + +/** * Connect to an existing Wayland display * * @brief This function is typically used by clients to connect to an diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c index ca5292d..f372d70 100644 --- a/src/lib/ecore_wl2/ecore_wl2_display.c +++ b/src/lib/ecore_wl2/ecore_wl2_display.c @@ -293,3 +293,10 @@ ecore_wl2_display_disconnect(Ecore_Wl2_Display *display) EINA_SAFETY_ON_NULL_RETURN(display); wl_display_disconnect(display->wl.display); } + +EAPI void +ecore_wl2_display_destroy(Ecore_Wl2_Display *display) +{ + EINA_SAFETY_ON_NULL_RETURN(display); + wl_display_destroy(display->wl.display); +}