ecore-wl2: Add events for adding and removing globals
authorChris Michael <cp.michael@samsung.com>
Tue, 18 Aug 2015 14:08:38 +0000 (10:08 -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.c

index 524228a..8943f81 100644 (file)
@@ -10,6 +10,10 @@ static int _ecore_wl2_init_count = 0;
 /* external variables */
 int _ecore_wl2_log_dom = -1;
 
+/* public API variables */
+EAPI int ECORE_WL2_EVENT_GLOBAL_ADDED = 0;
+EAPI int ECORE_WL2_EVENT_GLOBAL_REMOVED = 0;
+
 /* public API functions */
 EAPI int
 ecore_wl2_init(void)
@@ -42,6 +46,13 @@ ecore_wl2_init(void)
         goto ecore_event_err;
      }
 
+   /* handle creating new Ecore_Wl2 event types */
+   if (!ECORE_WL2_EVENT_GLOBAL_ADDED)
+     {
+        ECORE_WL2_EVENT_GLOBAL_ADDED = ecore_event_type_new();
+        ECORE_WL2_EVENT_GLOBAL_REMOVED = ecore_event_type_new();
+     }
+
    return _ecore_wl2_init_count;
 
 ecore_event_err: