e_util_comp_desk_count_get() -> e_desks_count()
also wtf is this double loop counting
This commit is contained in:
parent
fe2bc2346f
commit
4deb313dd6
|
@ -707,6 +707,23 @@ e_desk_flip_end(E_Desk *desk)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI unsigned int
|
||||||
|
e_desks_count(void)
|
||||||
|
{
|
||||||
|
Eina_List *l;
|
||||||
|
E_Zone *zone;
|
||||||
|
unsigned int count = 0;
|
||||||
|
|
||||||
|
EINA_LIST_FOREACH(e_comp->zones, l, zone)
|
||||||
|
{
|
||||||
|
int cx = 0, cy = 0;
|
||||||
|
|
||||||
|
e_zone_desk_count_get(zone, &cx, &cy);
|
||||||
|
count += cx * cy;
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_desk_free(E_Desk *desk)
|
_e_desk_free(E_Desk *desk)
|
||||||
{
|
{
|
||||||
|
|
|
@ -93,6 +93,8 @@ EAPI void e_desk_window_profile_update(void);
|
||||||
EAPI void e_desk_flip_cb_set(E_Desk_Flip_Cb cb, const void *data);
|
EAPI void e_desk_flip_cb_set(E_Desk_Flip_Cb cb, const void *data);
|
||||||
EAPI void e_desk_flip_end(E_Desk *desk);
|
EAPI void e_desk_flip_end(E_Desk *desk);
|
||||||
|
|
||||||
|
EAPI unsigned int e_desks_count(void);
|
||||||
|
|
||||||
extern EAPI int E_EVENT_DESK_SHOW;
|
extern EAPI int E_EVENT_DESK_SHOW;
|
||||||
extern EAPI int E_EVENT_DESK_BEFORE_SHOW;
|
extern EAPI int E_EVENT_DESK_BEFORE_SHOW;
|
||||||
extern EAPI int E_EVENT_DESK_AFTER_SHOW;
|
extern EAPI int E_EVENT_DESK_AFTER_SHOW;
|
||||||
|
|
|
@ -833,30 +833,6 @@ e_util_win_auto_resize_fill(Evas_Object *win)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI int
|
|
||||||
e_util_comp_desk_count_get(E_Comp *c)
|
|
||||||
{
|
|
||||||
Eina_List *zl;
|
|
||||||
E_Zone *zone;
|
|
||||||
int count = 0;
|
|
||||||
|
|
||||||
E_OBJECT_CHECK_RETURN(c, 0);
|
|
||||||
E_OBJECT_TYPE_CHECK_RETURN(c, E_COMP_TYPE, 0);
|
|
||||||
EINA_LIST_FOREACH(c->zones, zl, zone)
|
|
||||||
{
|
|
||||||
int x, y;
|
|
||||||
int cx = 0, cy = 0;
|
|
||||||
|
|
||||||
e_zone_desk_count_get(zone, &cx, &cy);
|
|
||||||
for (x = 0; x < cx; x++)
|
|
||||||
{
|
|
||||||
for (y = 0; y < cy; y++)
|
|
||||||
count += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* local subsystem functions */
|
/* local subsystem functions */
|
||||||
|
|
||||||
static Evas_Object *
|
static Evas_Object *
|
||||||
|
|
|
@ -47,7 +47,6 @@ EAPI void e_util_win_auto_resize_fill(Evas_Object *win);
|
||||||
dialog warning if loaded version is older or newer than current */
|
dialog warning if loaded version is older or newer than current */
|
||||||
EAPI Eina_Bool e_util_module_config_check(const char *module_name, int loaded, int current);
|
EAPI Eina_Bool e_util_module_config_check(const char *module_name, int loaded, int current);
|
||||||
|
|
||||||
EAPI int e_util_comp_desk_count_get(E_Comp *con);
|
|
||||||
EAPI E_Config_Binding_Key *e_util_binding_match(const Eina_List *bindlist, Ecore_Event_Key *ev, unsigned int *num, const E_Config_Binding_Key *skip);
|
EAPI E_Config_Binding_Key *e_util_binding_match(const Eina_List *bindlist, Ecore_Event_Key *ev, unsigned int *num, const E_Config_Binding_Key *skip);
|
||||||
EAPI Eina_Bool e_util_fullscreen_current_any(void);
|
EAPI Eina_Bool e_util_fullscreen_current_any(void);
|
||||||
EAPI Eina_Bool e_util_fullscreen_any(void);
|
EAPI Eina_Bool e_util_fullscreen_any(void);
|
||||||
|
|
Loading…
Reference in New Issue