diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2016-06-20 13:42:12 -0500 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2016-06-21 12:33:49 -0500 |
commit | fc37423c2eca4a09d7f55ec65c45bceee2b569f4 (patch) | |
tree | f0674eb82f48aeca97e8cb00f4e45cd99755333b | |
parent | 36c486906daa8049251b9116cebf6cd1b89353f0 (diff) | |
download | enlightenment-fc37423c2eca4a09d7f55ec65c45bceee2b569f4.tar.gz |
Add new API for finding a zone by its id string
-rw-r--r-- | src/bin/e_zone.c | 17 | ||||
-rw-r--r-- | src/bin/e_zone.h | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/bin/e_zone.c b/src/bin/e_zone.c index db8f3e61dd..58ff437199 100644 --- a/src/bin/e_zone.c +++ b/src/bin/e_zone.c @@ -1704,3 +1704,20 @@ _e_zone_obstacle_free(E_Zone_Obstacle *obs) } free(obs); } + +E_API E_Zone * +e_zone_for_id_get(const char *id) +{ + Eina_List *l = NULL; + E_Zone *zone; + + if (!e_comp) return NULL; + + EINA_LIST_FOREACH(e_comp->zones, l, zone) + { + if (strcmp(zone->randr2_id, id) == 0) + return zone; + } + + return NULL; +} diff --git a/src/bin/e_zone.h b/src/bin/e_zone.h index 371ead13cc..1741659d18 100644 --- a/src/bin/e_zone.h +++ b/src/bin/e_zone.h @@ -166,6 +166,8 @@ E_API void e_zone_fade_handle(E_Zone *zone, int out, double tim); E_API E_Zone_Obstacle *e_zone_obstacle_add(E_Zone *zone, E_Desk *desk, Eina_Rectangle *geom, Eina_Bool vertical); E_API void e_zone_obstacle_modify(E_Zone_Obstacle *obs, Eina_Rectangle *geom, Eina_Bool vertical); +E_API E_Zone *e_zone_for_id_get(const char *id); + extern E_API int E_EVENT_ZONE_DESK_COUNT_SET; extern E_API int E_EVENT_ZONE_MOVE_RESIZE; extern E_API int E_EVENT_ZONE_ADD; |