e_zone: add e_zone_is_displaying() function 06/295506/2
authorSooChan Lim <sc1.lim@samsung.com>
Fri, 7 Jul 2023 10:15:33 +0000 (19:15 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 10 Jul 2023 06:29:56 +0000 (06:29 +0000)
This function states if the zone is displaying or not.

Change-Id: Icff29c0da8726baf417daa96c5a6dd0802a9004b

src/bin/e_zone.c
src/bin/e_zone.h

index 331e345..62f8c45 100644 (file)
@@ -2049,3 +2049,17 @@ e_zone_has_ec(E_Zone *zone, E_Client *ec)
 
    return EINA_FALSE;
 }
+
+EINTERN Eina_Bool
+e_zone_is_displaying(E_Zone *zone)
+{
+  Eina_Bool ret = EINA_FALSE;
+
+  EINA_SAFETY_ON_NULL_RETURN_VAL(zone, EINA_FALSE);
+
+  if (zone->display_state == E_ZONE_DISPLAY_STATE_ON)
+    ret = EINA_TRUE;
+
+  return ret;
+}
+
index 1242f90..e2c5e1e 100644 (file)
@@ -281,6 +281,7 @@ E_API   Eina_Bool   e_zone_screen_splitscreen_enable(E_Zone *zone);
 
 EINTERN void      e_zone_client_add(E_Zone *zone, E_Client *ec);
 EINTERN Eina_Bool e_zone_has_ec(E_Zone *zone, E_Client *ec);
+EINTERN Eina_Bool e_zone_is_displaying(E_Zone *zone);
 
 extern EINTERN int E_EVENT_ZONE_DESK_COUNT_SET;
 extern E_API int E_EVENT_ZONE_MOVE_RESIZE;