devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=fda3c80ee031fed556de02d67e1a0c50bda6329c

commit fda3c80ee031fed556de02d67e1a0c50bda6329c
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Mon Sep 28 09:12:36 2015 -0400

    ecore-wl2: Add API function to find a window by id
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/ecore_wl2/Ecore_Wl2.h        |  3 +++
 src/lib/ecore_wl2/ecore_wl2_window.c | 13 +++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index d02e587..f407e8f 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -369,6 +369,9 @@ EAPI void ecore_wl2_window_resize(Ecore_Wl2_Window *window, 
int w, int h, int lo
  */
 EAPI void ecore_wl2_window_raise(Ecore_Wl2_Window *window);
 
+/* TODO: doxy */
+EAPI Ecore_Wl2_Window *ecore_wl2_window_find(Ecore_Wl2_Display *display, int 
id);
+
 /* # ifdef __cplusplus */
 /* } */
 /* # endif */
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c 
b/src/lib/ecore_wl2/ecore_wl2_window.c
index b9546fb..f8c95d7 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -480,3 +480,16 @@ ecore_wl2_window_raise(Ecore_Wl2_Window *window)
    if (window->wl_shell_surface)
      wl_shell_surface_set_toplevel(window->wl_shell_surface);
 }
+
+EAPI Ecore_Wl2_Window *
+ecore_wl2_window_find(Ecore_Wl2_Display *display, int id)
+{
+   Ecore_Wl2_Window *window;
+
+   EINA_SAFETY_ON_NULL_RETURN_VAL(display, NULL);
+
+   EINA_INLIST_FOREACH(display->windows, window)
+     if (window->id == id) return window;
+
+   return NULL;
+}

-- 


Reply via email to