ecore-wl2: Add API to find a window by surface
authorChristopher Michael <cp.michael@samsung.com>
Tue, 19 Nov 2019 14:01:53 +0000 (09:01 -0500)
committerJongmin Lee <jm105.lee@samsung.com>
Tue, 19 Nov 2019 21:30:06 +0000 (06:30 +0900)
This patch adds a convenience API that can be used to find a window
based on wl_surface.

@feature

src/lib/ecore_wl2/Ecore_Wl2.h
src/lib/ecore_wl2/ecore_wl2_display.c

index c0b2a1f..af10bdb 100644 (file)
@@ -899,10 +899,6 @@ EAPI Ecore_Wl2_Input *ecore_wl2_display_input_find_by_name(const Ecore_Wl2_Displ
  */
 EAPI Ecore_Wl2_Window *ecore_wl2_display_window_find(Ecore_Wl2_Display *display, unsigned int id);
 
-// TIZEN_ONLY(20171110)
-EAPI Ecore_Wl2_Window *ecore_wl2_display_window_find_by_surface(Ecore_Wl2_Display *display, struct wl_surface *surface);
-//
-
 /**
  * Retrieves the Wayland Registry used for the current Wayland display.
  *
@@ -941,6 +937,19 @@ EAPI Eina_Bool ecore_wl2_display_sync_is_done(const Ecore_Wl2_Display *display);
 EAPI const char *ecore_wl2_display_name_get(const Ecore_Wl2_Display *display);
 
 /**
+ * Finds an Ecore_Wl2_Window based on wl_surface
+ *
+ * @param display The display to search for the window
+ * @param surface The wl_surface of the window to find
+ *
+ * @return The Ecore_Wl2_Window if found, or NULL if no such window exists
+ *
+ * @ingroup Ecore_Wl2_Display_Group
+ * @since 1.24
+ */
+EAPI Ecore_Wl2_Window *ecore_wl2_display_window_find_by_surface(Ecore_Wl2_Display *display, struct wl_surface *surface);
+
+/**
  * @defgroup Ecore_Wl2_Window_Group Wayland Library Window Functions
  * @ingroup Ecore_Wl2_Group
  *
index e2c7619..2ad8771 100644 (file)
@@ -1935,14 +1935,6 @@ ecore_wl2_display_window_find(Ecore_Wl2_Display *display, unsigned int id)
    return NULL;
 }
 
-// TIZEN_ONLY(20171110)
-EAPI Ecore_Wl2_Window *
-ecore_wl2_display_window_find_by_surface(Ecore_Wl2_Display *display, struct wl_surface *surface)
-{
-   return _ecore_wl2_display_window_surface_find(display, surface);
-}
-//
-
 EAPI struct wl_registry *
 ecore_wl2_display_registry_get(Ecore_Wl2_Display *display)
 {
@@ -2035,3 +2027,9 @@ ecore_wl2_display_flush(Ecore_Wl2_Display *display)
 
    _begin_recovery_maybe(display, code);
 }
+
+EAPI Ecore_Wl2_Window *
+ecore_wl2_display_window_find_by_surface(Ecore_Wl2_Display *display, struct wl_surface *surface)
+{
+   return _ecore_wl2_display_window_surface_find(display, surface);
+}