e_slot: find top most client on slot 25/92425/4
authorJuyeon Lee <juyeonne.lee@samsung.com>
Mon, 17 Oct 2016 03:48:23 +0000 (12:48 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Mon, 17 Oct 2016 12:51:27 +0000 (05:51 -0700)
Change-Id: I8fb813edca34b959a66cd64aada21fab3ef1f30b
Signed-off-by: Juyeon Lee <juyeonne.lee@samsung.com>
src/bin/e_slot.c
src/bin/e_slot.h

index 9da17aca7a8e7b3c38eee0c5a4b6a214fb2f297a..927e4649513875338beb03f0f38484b6d8ff8561 100644 (file)
@@ -507,6 +507,29 @@ e_slot_find_by_id(int slot_id)
    return obj;
 }
 
+E_API E_Client *
+e_slot_client_top_find(Evas_Object *obj)
+{
+   Slot_Smart_Data *sd;
+   Evas_Object *o = NULL;
+   E_Client *ec = NULL;
+   sd = evas_object_smart_data_get(obj);
+   if (!sd) return NULL;
+
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
+     {
+        ec = evas_object_data_get(o, "E_Client");
+        if (!ec) continue;
+        if (e_object_is_del(E_OBJECT(ec))) continue;
+        if (e_client_util_ignored_get(ec)) continue;
+        if (ec->layout.s_id != sd->id) continue;
+        if ((!ec->visible) || (ec->hidden) || (!evas_object_visible_get(ec->frame))) continue;
+        return ec;
+     }
+
+   return NULL;
+}
+
 E_API Eina_Bool
 e_slot_client_add(Evas_Object *obj, E_Client *ec, Eina_Bool resizable)
 {
index b2efeb2cba3a9796ac7be84077bf249e194e902c..ef816323936169b21274c396766a032847b6d5a5 100644 (file)
@@ -26,6 +26,7 @@ E_API int                     e_slot_client_count_get(Evas_Object *obj);
 E_API int                     e_slot_client_slot_id_get(E_Client* ec);
 E_API int                     e_slot_client_type_get(E_Client* ec);
 E_API void                    e_slot_client_update(E_Client *ec);
+E_API E_Client               *e_slot_client_top_find(Evas_Object *obj);
 
 
 E_API void                    e_slot_raise(Evas_Object *obj);