aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-01-30 14:46:23 -0600
committerDerek Foreman <derekf@osg.samsung.com>2018-01-30 17:09:51 -0600
commitcc0cfb782221684ed9e65614a07e0018031788c2 (patch)
treeb33ebe1d46ab2e06fe85cc6ae751ff9db40ea866
parentecore: add function for prepending an event handler (diff)
downloadefl-cc0cfb782221684ed9e65614a07e0018031788c2.tar.gz
ecore_wl2: Add internal _ecore_wl2_output_find
This finds the Ecore_Wl2_Output * for a given struct wl_output *
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_output.c11
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_private.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_output.c b/src/lib/ecore_wl2/ecore_wl2_output.c
index ba1d7cea8f..0aa8791c12 100644
--- a/src/lib/ecore_wl2/ecore_wl2_output.c
+++ b/src/lib/ecore_wl2/ecore_wl2_output.c
@@ -117,6 +117,17 @@ _ecore_wl2_output_del(Ecore_Wl2_Output *output)
free(output);
}
+Ecore_Wl2_Output *
+_ecore_wl2_output_find(Ecore_Wl2_Display *display, struct wl_output *op)
+{
+ Ecore_Wl2_Output *wl2op;
+
+ EINA_INLIST_FOREACH(display->outputs, wl2op)
+ if (wl2op->wl_output == op) return wl2op;
+
+ return NULL;
+}
+
EAPI int
ecore_wl2_output_dpi_get(Ecore_Wl2_Output *output)
{
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h
index 05d264b993..ec7b767691 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -606,4 +606,6 @@ EAPI void ecore_wl2_window_weight_set(Ecore_Wl2_Window *window, double w, double
EAPI extern int _ecore_wl2_event_window_www;
EAPI extern int _ecore_wl2_event_window_www_drag;
+Ecore_Wl2_Output *_ecore_wl2_output_find(Ecore_Wl2_Display *dsp, struct wl_output *op);
+
#endif