forked from enlightenment/enlightenment
parent
d3294a2200
commit
1d1dcf4f9c
1
TODO
1
TODO
|
@ -83,7 +83,6 @@ Some of the things (in very short form) that need to be done to E17...
|
|||
* actions to make current zone different (warp mouse to there)
|
||||
* actions to make the current container different
|
||||
* titlebar/border expansion/gadget panel for modules to put window widgets in
|
||||
* add actions to flip desktops on a given zone and/or container only
|
||||
* break out desks x/y size config so you can have a different desktop size
|
||||
per zone - right now there is a signle global (use this later as the default
|
||||
for new/unconfigured zones)
|
||||
|
|
|
@ -355,6 +355,105 @@ ACT_FN_GO(desk_linear_flip_to)
|
|||
}
|
||||
}
|
||||
|
||||
#define ZONE_DESK_ACTION(con_num, zone_num, zone, act) \
|
||||
E_Zone *zone; \
|
||||
if ((con_num < 0) || (zone_num < 0)) { \
|
||||
Evas_List *l, *ll, *lll; \
|
||||
E_Container *con; \
|
||||
E_Manager *man; \
|
||||
if ((con_num >= 0) && (zone_num < 0)) /* con=1 zone=all */ { \
|
||||
con = e_util_container_number_get(con_num); \
|
||||
for (l = con->zones; l; l = l->next) { \
|
||||
zone = l->data; \
|
||||
act; \
|
||||
} } \
|
||||
else if ((con_num < 0) && (zone_num >= 0)) /* con=all zone=1 */ { \
|
||||
for (l = e_manager_list(); l; l = l->next) { \
|
||||
man = l->data; \
|
||||
for (ll = man->containers; ll; ll = ll->next) { \
|
||||
con = ll->data; \
|
||||
zone = e_container_zone_number_get(con, zone_num); \
|
||||
if (zone) \
|
||||
act; \
|
||||
} } } \
|
||||
else if ((con_num < 0) && (zone_num < 0)) /* con=all zone=all */ { \
|
||||
for (l = e_manager_list(); l; l = l->next) { \
|
||||
man = l->data; \
|
||||
for (ll = man->containers; ll; ll = ll->next) { \
|
||||
con = ll->data; \
|
||||
for (lll = con->zones; lll; lll = lll->next) { \
|
||||
zone = lll->data; \
|
||||
act; \
|
||||
} } } } } \
|
||||
else { \
|
||||
zone = e_util_container_zone_number_get(con_num, zone_num); \
|
||||
if (zone) act; \
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
ACT_FN_GO(zone_desk_flip_by)
|
||||
{
|
||||
if (params)
|
||||
{
|
||||
int con_num = 0, zone_num = 0;
|
||||
int dx = 0, dy = 0;
|
||||
|
||||
if (sscanf(params, "%i %i %i %i", &con_num, &zone_num, &dx, &dy) == 4)
|
||||
{
|
||||
ZONE_DESK_ACTION(con_num, zone_num, zone,
|
||||
e_zone_desk_flip_by(zone, dx, dy));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
ACT_FN_GO(zone_desk_flip_to)
|
||||
{
|
||||
if (params)
|
||||
{
|
||||
int con_num = 0, zone_num = 0;
|
||||
int dx = 0, dy = 0;
|
||||
|
||||
if (sscanf(params, "%i %i %i %i", &con_num, &zone_num, &dx, &dy) == 4)
|
||||
{
|
||||
ZONE_DESK_ACTION(con_num, zone_num, zone,
|
||||
e_zone_desk_flip_to(zone, dx, dy));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
ACT_FN_GO(zone_desk_linear_flip_by)
|
||||
{
|
||||
if (params)
|
||||
{
|
||||
int con_num = 0, zone_num = 0;
|
||||
int dx = 0;
|
||||
|
||||
if (sscanf(params, "%i %i %i", &con_num, &zone_num, &dx) == 3)
|
||||
{
|
||||
ZONE_DESK_ACTION(con_num, zone_num, zone,
|
||||
e_zone_desk_linear_flip_by(zone, dx));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
ACT_FN_GO(zone_desk_linear_flip_to)
|
||||
{
|
||||
if (params)
|
||||
{
|
||||
int con_num = 0, zone_num = 0;
|
||||
int dx = 0;
|
||||
|
||||
if (sscanf(params, "%i %i %i", &con_num, &zone_num, &dx) == 3)
|
||||
{
|
||||
ZONE_DESK_ACTION(con_num, zone_num, zone,
|
||||
e_zone_desk_linear_flip_to(zone, dx));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
static void
|
||||
_e_actions_cb_menu_end(void *data, E_Menu *m)
|
||||
|
|
|
@ -132,3 +132,30 @@ e_util_glob_match(char *str, char *glob)
|
|||
if (!fnmatch(glob, str, 0)) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
E_Container *
|
||||
e_util_container_number_get(int num)
|
||||
{
|
||||
Evas_List *l;
|
||||
|
||||
for (l = e_manager_list(); l; l = l->next)
|
||||
{
|
||||
E_Manager *man;
|
||||
E_Container *con;
|
||||
|
||||
man = l->data;
|
||||
con = e_manager_container_number_get(man, num);
|
||||
if (con) return con;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
E_Zone *
|
||||
e_util_container_zone_number_get(int con_num, int zone_num)
|
||||
{
|
||||
E_Container *con;
|
||||
|
||||
con = e_util_container_number_get(con_num);
|
||||
if (!con) return NULL;
|
||||
return e_container_zone_number_get(con, zone_num);
|
||||
}
|
||||
|
|
|
@ -6,14 +6,16 @@
|
|||
#ifndef E_UTILS_H
|
||||
#define E_UTILS_H
|
||||
|
||||
EAPI void e_util_container_fake_mouse_up_later(E_Container *con, int button);
|
||||
EAPI void e_util_container_fake_mouse_up_all_later(E_Container *con);
|
||||
EAPI void e_util_wakeup(void);
|
||||
EAPI void e_util_env_set(const char *var, const char *val);
|
||||
EAPI E_Zone *e_util_zone_current_get(E_Manager *man);
|
||||
EAPI int e_util_utils_installed(void);
|
||||
EAPI int e_util_app_installed(char *app);
|
||||
EAPI int e_util_glob_match(char *str, char *glob);
|
||||
EAPI void e_util_container_fake_mouse_up_later(E_Container *con, int button);
|
||||
EAPI void e_util_container_fake_mouse_up_all_later(E_Container *con);
|
||||
EAPI void e_util_wakeup(void);
|
||||
EAPI void e_util_env_set(const char *var, const char *val);
|
||||
EAPI E_Zone *e_util_zone_current_get(E_Manager *man);
|
||||
EAPI int e_util_utils_installed(void);
|
||||
EAPI int e_util_app_installed(char *app);
|
||||
EAPI int e_util_glob_match(char *str, char *glob);
|
||||
EAPI E_Container *e_util_container_number_get(int num);
|
||||
EAPI E_Zone *e_util_container_zone_number_get(int con_num, int zone_num);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue