discomfitor pushed a commit to branch master.

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

commit 29b99a8e88998664bb3abc417cd6e208bb1b6bf9
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Fri Aug 4 16:17:53 2017 -0400

    efl-wl: add handling for external protocol interfaces
    
    @feature
---
 src/lib/efl_wl/Efl_Wl.h |  9 +++++++++
 src/lib/efl_wl/efl_wl.c | 11 +++++++++++
 2 files changed, 20 insertions(+)

diff --git a/src/lib/efl_wl/Efl_Wl.h b/src/lib/efl_wl/Efl_Wl.h
index 8b28309fd0..818cc39cd4 100644
--- a/src/lib/efl_wl/Efl_Wl.h
+++ b/src/lib/efl_wl/Efl_Wl.h
@@ -122,6 +122,15 @@ EAPI void efl_wl_aspect_set(Evas_Object *obj, Eina_Bool 
set);
  * @param set Whether to enable min/max setting
  */
 EAPI void efl_wl_minmax_set(Evas_Object *obj, Eina_Bool set);
+
+/**
+ * Add an externally-managed global to the compositor
+ * @note The external implementation is expected to restrict access to 
authorized
+ * clients
+ * @see wl_global_create() docs
+ * @since 1.21
+ */
+EAPI void *efl_wl_global_add(Evas_Object *obj, const void *interface, uint32_t 
version, void *data, void *bind_cb);
 #endif
 
 #endif
diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index 575012e0e6..a5004f06af 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -5420,3 +5420,14 @@ efl_wl_minmax_set(Evas_Object *obj, Eina_Bool set)
         evas_object_size_hint_max_set(obj, -1, -1);
      }
 }
+
+EAPI void *
+efl_wl_global_add(Evas_Object *obj, const void *interface, uint32_t version, 
void *data, void *bind_cb)
+{
+   Comp *c;
+
+   if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
+   EINA_SAFETY_ON_NULL_RETURN_VAL(interface, NULL);
+   c = evas_object_smart_data_get(obj);
+   return wl_global_create(c->display, interface, version, data, bind_cb);
+}

-- 


Reply via email to