e_comp: added e_comp_vis_ec_list_get 12/76112/3
authorJuyeon Lee <juyeonne.lee@samsung.com>
Thu, 23 Jun 2016 01:43:48 +0000 (10:43 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 28 Jun 2016 07:30:00 +0000 (00:30 -0700)
Change-Id: I3cc65dee33da81fdad034c3181d381974bfc1dca

src/bin/e_comp.c
src/bin/e_comp.h

index 6a5abc1..be29e0f 100644 (file)
@@ -1949,4 +1949,38 @@ e_comp_is_on_overlay(E_Client *ec)
           }
      }
    return EINA_FALSE;
-}
\ No newline at end of file
+}
+
+E_API Eina_List *
+e_comp_vis_ec_list_get(E_Zone *zone)
+{
+   Eina_List *ec_list = NULL;
+   E_Client  *ec;
+
+   E_OBJECT_CHECK_RETURN(zone, NULL);
+   E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, NULL);
+
+   if (!zone->output_id) return NULL; // no hw layer
+
+   // TODO: check if eout is available to use hwc policy
+   E_CLIENT_REVERSE_FOREACH(ec)
+     {
+        if (ec->zone != zone) continue;
+
+        // check clients to skip composite
+        if (e_client_util_ignored_get() || (!evas_object_visible_get(ec->frame)))
+          continue;
+
+        // check geometry if located out of screen such as quick panel
+        if (!E_INTERSECTS(0, 0, e_comp->w, e_comp->h,
+                          ec->client.x, ec->client.y, ec->client.w, ec->client.h))
+             continue;
+
+        if (evas_object_data_get(ec->frame, "comp_skip"))
+          continue;
+
+        ec_list = eina_list_append(ec_list, ec);
+     }
+
+   return ec_list;
+}
index b3bd92f..836f515 100644 (file)
@@ -238,6 +238,7 @@ E_API E_Comp_Hook *e_comp_hook_add(E_Comp_Hook_Point hookpoint, E_Comp_Hook_Cb f
 E_API void e_comp_hook_del(E_Comp_Hook *ph);
 EINTERN Eina_Bool e_comp_is_on_overlay(E_Client *ec);
 E_API void e_comp_hwc_end(const char *location);
+E_API Eina_List *e_comp_vis_ec_list_get(E_Zone *zone); // visible ec list sorted by z order
 
 #endif
 #endif