ecore-wl2: Add API function for clients to disconnect from a Wayland display
authorChris Michael <cp.michael@samsung.com>
Thu, 20 Aug 2015 14:15:07 +0000 (10:15 -0400)
committerChris Michael <cp.michael@samsung.com>
Thu, 3 Dec 2015 17:02:40 +0000 (12:02 -0500)
Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/ecore_wl2/Ecore_Wl2.h
src/lib/ecore_wl2/ecore_wl2_display.c

index 97fa3c6..0ae3f8d 100644 (file)
@@ -130,6 +130,18 @@ EAPI Ecore_Wl2_Display *ecore_wl2_display_create(const char *name);
 EAPI Ecore_Wl2_Display *ecore_wl2_display_connect(const char *name);
 
 /**
+ * Disconnect an existing Wayland display
+ *
+ * @brief This function is typically used by clients to disconnect from an
+ * existing Wayland display.
+ *
+ * @param display The display to disconnect from
+ *
+ * @ingroup Ecore_Wl2_Display_Group
+ */
+EAPI void ecore_wl2_display_disconnect(Ecore_Wl2_Display *display);
+
+/**
  * Retrieve the existing Wayland display
  *
  * @param display The Ecore_Wl2_Display for which to retrieve the existing
index 366077b..ca5292d 100644 (file)
@@ -286,3 +286,10 @@ ecore_wl2_display_shm_get(Ecore_Wl2_Display *display)
    EINA_SAFETY_ON_NULL_RETURN_VAL(display, NULL);
    return display->wl.shm;
 }
+
+EAPI void
+ecore_wl2_display_disconnect(Ecore_Wl2_Display *display)
+{
+   EINA_SAFETY_ON_NULL_RETURN(display);
+   wl_display_disconnect(display->wl.display);
+}