static int
_pol_cfd_data_basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
{
- E_Comp *comp;
E_Zone *zone;
E_Desk *desk;
Pol_Softkey *softkey;
EINA_LIST_FOREACH(cfdata->conf->desks, l, d)
{
- comp = e_comp_number_get(d->comp_num);
- zone = e_comp_zone_number_get(comp, d->zone_num);
+ zone = e_comp_zone_number_get(e_comp, d->zone_num);
desk = e_desk_at_xy_get(zone, d->x, d->y);
if (!desk) continue;
_pol_cfd_data_basic_widgets_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data *cfdata)
{
Evas_Object *base, *fl, *lb, *lo, *o;
- E_Comp *comp;
E_Zone *zone;
Eina_List *l;
- comp = e_comp_get(NULL);
-
base = e_widget_list_add(evas, 0, 0);
fl = e_widget_framelist_add(evas, _("Softkey"), 0);
fl = e_widget_framelist_add(evas, _("Softkey"), 0);
e_widget_ilist_multi_select_set(o, EINA_FALSE);
e_widget_size_min_set(o, 100, 100);
e_widget_on_change_hook_set(o, _pol_cfd_hook_zone_change, cfdata);
- EINA_LIST_REVERSE_FOREACH(comp->zones, l, zone)
+ EINA_LIST_REVERSE_FOREACH(e_comp->zones, l, zone)
e_widget_ilist_append(o, NULL, zone->name, NULL, zone, NULL);
e_widget_ilist_go(o);
e_widget_ilist_selected_set(o, 0);
e_widget_list_object_append(lo, o, 1, 1, 0.5);
/* update virtual desktops of first zone */
- zone = eina_list_data_get(comp->zones);
+ zone = eina_list_data_get(e_comp->zones);
_pol_cfd_desk_list_update(cfdata, zone);
e_widget_framelist_object_append(fl, lo);
void
e_mod_pol_conf_init(Mod *mod)
{
- E_Comp *comp;
E_Zone *zone;
E_Desk *desk;
Config *conf;
conf->use_softkey = 1;
conf->softkey_size = 42;
- comp = e_comp_get(NULL);
- zone = e_zone_current_get(comp);
+ zone = e_zone_current_get(e_comp);
desk = e_desk_current_get(zone);
_pol_conf_desk_add(conf, desk);
}
e_mod_pol_desk_add(E_Desk *desk)
{
Pol_Desk *pd;
- E_Comp *comp;
E_Client *ec;
Pol_Softkey *softkey;
const Eina_List *l;
eina_hash_add(hash_pol_desks, &desk, pd);
/* add clients */
- EINA_LIST_FOREACH(e_comp_list(), l, comp)
- E_CLIENT_FOREACH(comp, ec)
- {
- if (pd->desk == ec->desk)
- _pol_client_add(ec);
- }
+ E_CLIENT_FOREACH(e_comp, ec)
+ {
+ if (pd->desk == ec->desk)
+ _pol_client_add(ec);
+ }
/* add and show softkey */
if (_pol_mod->conf->use_softkey)
e_modapi_init(E_Module *m)
{
Mod *mod;
- E_Comp *comp;
E_Zone *zone;
Config_Desk *d;
- const Eina_List *l, *ll;
+ const Eina_List *l;
int i, n;
char buf[PATH_MAX];
e_mod_pol_conf_init(mod);
- EINA_LIST_FOREACH(e_comp_list(), l, comp)
- EINA_LIST_FOREACH(comp->zones, ll, zone)
- {
- //Eina_Bool home_add = EINA_FALSE;
- n = zone->desk_y_count * zone->desk_x_count;
- for (i = 0; i < n; i++)
- {
- d = e_mod_pol_conf_desk_get_by_nums(_pol_mod->conf,
- comp->num,
- zone->num,
- zone->desks[i]->x,
- zone->desks[i]->y);
- if (d)
- {
- e_mod_pol_desk_add(zone->desks[i]);
- //home_add = EINA_TRUE;
- }
- }
-
- /* FIXME: should consider the case that illume-home module
- * is not loaded yet and make it configurable.
- * and also, this code will be enabled when e_policy stuff lands in e.
- */
- //if (home_add)
- // e_policy_zone_home_add_request(zone);
- }
+ EINA_LIST_FOREACH(e_comp->zones, l, zone)
+ {
+ //Eina_Bool home_add = EINA_FALSE;
+ n = zone->desk_y_count * zone->desk_x_count;
+ for (i = 0; i < n; i++)
+ {
+ d = e_mod_pol_conf_desk_get_by_nums(_pol_mod->conf,
+ e_comp->num,
+ zone->num,
+ zone->desks[i]->x,
+ zone->desks[i]->y);
+ if (d)
+ {
+ e_mod_pol_desk_add(zone->desks[i]);
+ //home_add = EINA_TRUE;
+ }
+ }
+
+ /* FIXME: should consider the case that illume-home module
+ * is not loaded yet and make it configurable.
+ * and also, this code will be enabled when e_policy stuff lands in e.
+ */
+ //if (home_add)
+ // e_policy_zone_home_add_request(zone);
+ }
E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_ADD,
_pol_cb_zone_add, NULL);
static Eina_Bool
_e_client_rotation_zone_set(E_Zone *zone)
{
- E_Comp *comp;
- Eina_List *cl;
E_Client *ec = NULL;
Eina_Bool res = EINA_FALSE;
Eina_Bool ret = EINA_FALSE;
+ E_Zone *ez;
+ Eina_List *zl;
/* step 1. make the list needs to be rotated. */
- EINA_LIST_FOREACH(e_comp_list(), cl, comp)
+ EINA_LIST_FOREACH(e_comp->zones, zl, ez)
{
- E_Zone *ez;
- Eina_List *zl;
+ Eina_List *l;
- EINA_LIST_FOREACH(comp->zones, zl, ez)
+ if (ez != zone) continue;
+
+ EINA_LIST_REVERSE_FOREACH(zone->comp->clients, l, ec)
{
- Eina_List *l;
+ if(ec->zone != zone) continue;
+
+ // if this window has parent and window type isn't "ECORE_X_WINDOW_TYPE_NORMAL",
+ // it will be rotated when parent do rotate itself.
+ // so skip here.
+ if ((ec->parent) &&
+ (ec->netwm.type != E_WINDOW_TYPE_NORMAL)) continue;
+
+ // default type is "E_CLIENT_ROTATION_TYPE_NORMAL",
+ // but it can be changed to "E_CLIENT_ROTATION_TYPE_DEPENDENT" by illume according to its policy.
+ // if it's not normal type window, will be rotated by illume.
+ // so skip here.
+ if (ec->e.state.rot.type != E_CLIENT_ROTATION_TYPE_NORMAL) continue;
- if (ez != zone) continue;
+ if ((!evas_object_visible_get(ec->frame)) ||
+ (!E_INTERSECTS(ec->zone->x, ec->zone->y, ec->zone->w, ec->zone->h,
+ ec->x, ec->y, ec->w, ec->h))) continue;
- EINA_LIST_REVERSE_FOREACH(zone->comp->clients, l, ec)
+ res = e_client_rotation_set(ec, zone->rot.curr);
+ if (!res)
{
- if(ec->zone != zone) continue;
-
- // if this window has parent and window type isn't "ECORE_X_WINDOW_TYPE_NORMAL",
- // it will be rotated when parent do rotate itself.
- // so skip here.
- if ((ec->parent) &&
- (ec->netwm.type != E_WINDOW_TYPE_NORMAL)) continue;
-
- // default type is "E_CLIENT_ROTATION_TYPE_NORMAL",
- // but it can be changed to "E_CLIENT_ROTATION_TYPE_DEPENDENT" by illume according to its policy.
- // if it's not normal type window, will be rotated by illume.
- // so skip here.
- if (ec->e.state.rot.type != E_CLIENT_ROTATION_TYPE_NORMAL) continue;
-
- if ((!evas_object_visible_get(ec->frame)) ||
- (!E_INTERSECTS(ec->zone->x, ec->zone->y, ec->zone->w, ec->zone->h,
- ec->x, ec->y, ec->w, ec->h))) continue;
-
- res = e_client_rotation_set(ec, zone->rot.curr);
- if (!res)
- {
- ;
- }
- else ret = EINA_TRUE;
+ ;
}
+ else ret = EINA_TRUE;
}
}
desk = e_desk_current_get(zone);
launcher = e_mod_pol_client_launcher_get(zone);
- E_CLIENT_REVERSE_FOREACH(e_comp_get(desk), ec)
+ E_CLIENT_REVERSE_FOREACH(e_comp, ec)
{
if (e_client_util_ignored_get(ec)) continue;
if (!e_client_util_desk_visible(ec, desk)) continue;
Evas_Object *obj, *comp_obj;
char path[PATH_MAX], group[PATH_MAX];
- obj = edje_object_add(e_comp_get(NULL)->evas);
+ obj = edje_object_add(e_comp->evas);
snprintf(group, sizeof(group), "e/modules/policy-mobile/softkey/%s", name);
snprintf(path, sizeof(path), "%s/e-module-policy.edj",
void
e_mod_pol_visibility_calc(void)
{
- E_Comp *comp;
- Eina_List *cl;
+ E_Zone *zone;
+ Eina_List *zl;
- EINA_LIST_FOREACH(e_comp_list(), cl, comp)
+ EINA_LIST_FOREACH(e_comp->zones, zl, zone)
{
- E_Zone *zone;
- Eina_List *zl;
-
- EINA_LIST_FOREACH(comp->zones, zl, zone)
- {
- e_mod_pol_zone_visibility_calc(zone);
- }
+ e_mod_pol_zone_visibility_calc(zone);
}
}