From: Changyeon Lee Date: Thu, 4 Jun 2020 08:50:48 +0000 (+0900) Subject: e_comp_wl_rsm: add e_comp_wl_remote_surface_consumers_get X-Git-Tag: submit/tizen/20200617.070953~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ee0cdfbc430b72d8bffc100081a84f9a0b404e6;p=platform%2Fupstream%2Fenlightenment.git e_comp_wl_rsm: add e_comp_wl_remote_surface_consumers_get Change-Id: Ia8a059bf4692c85384d064b48543991310e48145 --- diff --git a/src/bin/e_comp_wl_rsm.c b/src/bin/e_comp_wl_rsm.c index d2ec7acd70..278fdbda72 100644 --- a/src/bin/e_comp_wl_rsm.c +++ b/src/bin/e_comp_wl_rsm.c @@ -3520,6 +3520,35 @@ e_comp_wl_remote_surface_providers_get(E_Client *ec) return provs; } +/** + * Get a list of e_clients of tizen remote surface consumers which use given ec + * NB: caller must free returned Eina_List object after using it. + */ +E_API Eina_List * +e_comp_wl_remote_surface_consumers_get(E_Client *ec) +{ + Eina_List *consumer_ec_l = NULL; /* result list */ + E_Client *consumer_ec; + E_Comp_Wl_Remote_Surface *rs; + E_Comp_Wl_Remote_Provider *provider; + Eina_List *l; + + provider = _remote_provider_find(ec); + if (!provider) return NULL; + + EINA_LIST_FOREACH(provider->common.surfaces, l, rs) + { + consumer_ec = rs->ec; + if (!consumer_ec) consumer_ec = rs->bind_ec; + if (!consumer_ec) continue; + if (!consumer_ec->remote_surface.consumer) continue; + + consumer_ec_l = eina_list_append(consumer_ec_l, consumer_ec); + } + + return consumer_ec_l; +} + #undef E_CLIENT_HOOK_APPEND #define E_CLIENT_HOOK_APPEND(l, t, cb, d) \ do \ diff --git a/src/bin/e_comp_wl_rsm.h b/src/bin/e_comp_wl_rsm.h index 0e04edfcea..13030694a2 100644 --- a/src/bin/e_comp_wl_rsm.h +++ b/src/bin/e_comp_wl_rsm.h @@ -20,6 +20,12 @@ E_API E_Client *e_comp_wl_remote_surface_bound_provider_ec_get(E_Client *ec); */ E_API Eina_List *e_comp_wl_remote_surface_providers_get(E_Client *ec); +/** + * Get a list of e_clients of tizen remote surface consumers which use given ec + * NB: caller must free returned Eina_List object after using it. + */ +E_API Eina_List *e_comp_wl_remote_surface_consumers_get(E_Client *ec); + E_API extern int E_EVENT_REMOTE_SURFACE_PROVIDER_VISIBILITY_CHANGE; struct _E_Event_Remote_Surface_Provider