forked from enlightenment/enlightenment
parent
bd9200c460
commit
5ec802d8ba
201
src/bin/e_zone.c
201
src/bin/e_zone.c
|
@ -5,21 +5,44 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void _e_zone_free(E_Zone *zone);
|
static void _e_zone_free(E_Zone *zone);
|
||||||
static void _e_zone_cb_bg_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event_info);
|
static void _e_zone_cb_bg_mouse_down(void *data,
|
||||||
static void _e_zone_cb_bg_mouse_up(void *data, Evas *evas, Evas_Object *obj, void *event_info);
|
Evas *evas,
|
||||||
static void _e_zone_event_zone_desk_count_set_free(void *data, void *ev);
|
Evas_Object *obj,
|
||||||
static Eina_Bool _e_zone_cb_mouse_in(void *data, int type, void *event);
|
void *event_info);
|
||||||
static Eina_Bool _e_zone_cb_mouse_out(void *data, int type, void *event);
|
static void _e_zone_cb_bg_mouse_up(void *data,
|
||||||
static Eina_Bool _e_zone_cb_mouse_down(void *data, int type, void *event);
|
Evas *evas,
|
||||||
static Eina_Bool _e_zone_cb_mouse_up(void *data, int type, void *event);
|
Evas_Object *obj,
|
||||||
static Eina_Bool _e_zone_cb_mouse_move(void *data, int type, void *event);
|
void *event_info);
|
||||||
static Eina_Bool _e_zone_cb_desk_after_show(void *data, int type, void *event);
|
static void _e_zone_event_zone_desk_count_set_free(void *data,
|
||||||
|
void *ev);
|
||||||
|
static Eina_Bool _e_zone_cb_mouse_in(void *data,
|
||||||
|
int type,
|
||||||
|
void *event);
|
||||||
|
static Eina_Bool _e_zone_cb_mouse_out(void *data,
|
||||||
|
int type,
|
||||||
|
void *event);
|
||||||
|
static Eina_Bool _e_zone_cb_mouse_down(void *data,
|
||||||
|
int type,
|
||||||
|
void *event);
|
||||||
|
static Eina_Bool _e_zone_cb_mouse_up(void *data,
|
||||||
|
int type,
|
||||||
|
void *event);
|
||||||
|
static Eina_Bool _e_zone_cb_mouse_move(void *data,
|
||||||
|
int type,
|
||||||
|
void *event);
|
||||||
|
static Eina_Bool _e_zone_cb_desk_after_show(void *data,
|
||||||
|
int type,
|
||||||
|
void *event);
|
||||||
static Eina_Bool _e_zone_cb_edge_timer(void *data);
|
static Eina_Bool _e_zone_cb_edge_timer(void *data);
|
||||||
static void _e_zone_event_move_resize_free(void *data, void *ev);
|
static void _e_zone_event_move_resize_free(void *data,
|
||||||
static void _e_zone_event_add_free(void *data, void *ev);
|
void *ev);
|
||||||
static void _e_zone_event_del_free(void *data, void *ev);
|
static void _e_zone_event_add_free(void *data,
|
||||||
|
void *ev);
|
||||||
|
static void _e_zone_event_del_free(void *data,
|
||||||
|
void *ev);
|
||||||
static void _e_zone_object_del_attach(void *o);
|
static void _e_zone_object_del_attach(void *o);
|
||||||
static E_Zone_Edge _e_zone_detect_edge(E_Zone *zone, Ecore_X_Window win);
|
static E_Zone_Edge _e_zone_detect_edge(E_Zone *zone,
|
||||||
|
Ecore_X_Window win);
|
||||||
static void _e_zone_edge_move_resize(E_Zone *zone);
|
static void _e_zone_edge_move_resize(E_Zone *zone);
|
||||||
|
|
||||||
EAPI int E_EVENT_ZONE_DESK_COUNT_SET = 0;
|
EAPI int E_EVENT_ZONE_DESK_COUNT_SET = 0;
|
||||||
|
@ -118,7 +141,13 @@ _e_zone_black_unget(E_Zone *zone)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI E_Zone *
|
EAPI E_Zone *
|
||||||
e_zone_new(E_Container *con, int num, int id, int x, int y, int w, int h)
|
e_zone_new(E_Container *con,
|
||||||
|
int num,
|
||||||
|
int id,
|
||||||
|
int x,
|
||||||
|
int y,
|
||||||
|
int w,
|
||||||
|
int h)
|
||||||
{
|
{
|
||||||
E_Zone *zone;
|
E_Zone *zone;
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
@ -208,7 +237,8 @@ e_zone_new(E_Container *con, int num, int id, int x, int y, int w, int h)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_zone_name_set(E_Zone *zone, const char *name)
|
e_zone_name_set(E_Zone *zone,
|
||||||
|
const char *name)
|
||||||
{
|
{
|
||||||
E_OBJECT_CHECK(zone);
|
E_OBJECT_CHECK(zone);
|
||||||
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
|
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
|
||||||
|
@ -218,7 +248,9 @@ e_zone_name_set(E_Zone *zone, const char *name)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_zone_move(E_Zone *zone, int x, int y)
|
e_zone_move(E_Zone *zone,
|
||||||
|
int x,
|
||||||
|
int y)
|
||||||
{
|
{
|
||||||
E_Event_Zone_Move_Resize *ev;
|
E_Event_Zone_Move_Resize *ev;
|
||||||
|
|
||||||
|
@ -249,7 +281,9 @@ e_zone_move(E_Zone *zone, int x, int y)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_zone_resize(E_Zone *zone, int w, int h)
|
e_zone_resize(E_Zone *zone,
|
||||||
|
int w,
|
||||||
|
int h)
|
||||||
{
|
{
|
||||||
E_Event_Zone_Move_Resize *ev;
|
E_Event_Zone_Move_Resize *ev;
|
||||||
|
|
||||||
|
@ -281,7 +315,11 @@ e_zone_resize(E_Zone *zone, int w, int h)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_zone_move_resize(E_Zone *zone, int x, int y, int w, int h)
|
e_zone_move_resize(E_Zone *zone,
|
||||||
|
int x,
|
||||||
|
int y,
|
||||||
|
int w,
|
||||||
|
int h)
|
||||||
{
|
{
|
||||||
E_Event_Zone_Move_Resize *ev;
|
E_Event_Zone_Move_Resize *ev;
|
||||||
|
|
||||||
|
@ -324,7 +362,8 @@ e_zone_move_resize(E_Zone *zone, int x, int y, int w, int h)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_zone_fullscreen_set(E_Zone *zone, int on)
|
e_zone_fullscreen_set(E_Zone *zone,
|
||||||
|
int on)
|
||||||
{
|
{
|
||||||
E_OBJECT_CHECK(zone);
|
E_OBJECT_CHECK(zone);
|
||||||
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
|
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
|
||||||
|
@ -377,7 +416,9 @@ e_zone_bg_reconfigure(E_Zone *zone)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_zone_flip_coords_handle(E_Zone *zone, int x, int y)
|
e_zone_flip_coords_handle(E_Zone *zone,
|
||||||
|
int x,
|
||||||
|
int y)
|
||||||
{
|
{
|
||||||
E_Event_Zone_Edge *zev;
|
E_Event_Zone_Edge *zev;
|
||||||
E_Binding_Edge *bind;
|
E_Binding_Edge *bind;
|
||||||
|
@ -424,7 +465,7 @@ e_zone_flip_coords_handle(E_Zone *zone, int x, int y)
|
||||||
edge = E_ZONE_EDGE_LEFT;
|
edge = E_ZONE_EDGE_LEFT;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
noflip:
|
noflip:
|
||||||
|
|
||||||
if (zone->flip.es)
|
if (zone->flip.es)
|
||||||
e_shelf_toggle(zone->flip.es, 0);
|
e_shelf_toggle(zone->flip.es, 0);
|
||||||
|
@ -441,21 +482,25 @@ e_zone_flip_coords_handle(E_Zone *zone, int x, int y)
|
||||||
case E_GADCON_ORIENT_CORNER_TR:
|
case E_GADCON_ORIENT_CORNER_TR:
|
||||||
if (edge == E_ZONE_EDGE_TOP) ok = 1;
|
if (edge == E_ZONE_EDGE_TOP) ok = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_GADCON_ORIENT_BOTTOM:
|
case E_GADCON_ORIENT_BOTTOM:
|
||||||
case E_GADCON_ORIENT_CORNER_BL:
|
case E_GADCON_ORIENT_CORNER_BL:
|
||||||
case E_GADCON_ORIENT_CORNER_BR:
|
case E_GADCON_ORIENT_CORNER_BR:
|
||||||
if (edge == E_ZONE_EDGE_BOTTOM) ok = 1;
|
if (edge == E_ZONE_EDGE_BOTTOM) ok = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_GADCON_ORIENT_LEFT:
|
case E_GADCON_ORIENT_LEFT:
|
||||||
case E_GADCON_ORIENT_CORNER_LT:
|
case E_GADCON_ORIENT_CORNER_LT:
|
||||||
case E_GADCON_ORIENT_CORNER_LB:
|
case E_GADCON_ORIENT_CORNER_LB:
|
||||||
if (edge == E_ZONE_EDGE_LEFT) ok = 1;
|
if (edge == E_ZONE_EDGE_LEFT) ok = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_GADCON_ORIENT_RIGHT:
|
case E_GADCON_ORIENT_RIGHT:
|
||||||
case E_GADCON_ORIENT_CORNER_RT:
|
case E_GADCON_ORIENT_CORNER_RT:
|
||||||
case E_GADCON_ORIENT_CORNER_RB:
|
case E_GADCON_ORIENT_CORNER_RB:
|
||||||
if (edge == E_ZONE_EDGE_RIGHT) ok = 1;
|
if (edge == E_ZONE_EDGE_RIGHT) ok = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ok = 0;
|
ok = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -476,15 +521,19 @@ e_zone_flip_coords_handle(E_Zone *zone, int x, int y)
|
||||||
case E_ZONE_EDGE_LEFT:
|
case E_ZONE_EDGE_LEFT:
|
||||||
if (E_ZONE_FLIP_LEFT(zone)) ok = 1;
|
if (E_ZONE_FLIP_LEFT(zone)) ok = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_EDGE_TOP:
|
case E_ZONE_EDGE_TOP:
|
||||||
if (E_ZONE_FLIP_UP(zone)) ok = 1;
|
if (E_ZONE_FLIP_UP(zone)) ok = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_EDGE_RIGHT:
|
case E_ZONE_EDGE_RIGHT:
|
||||||
if (E_ZONE_FLIP_RIGHT(zone)) ok = 1;
|
if (E_ZONE_FLIP_RIGHT(zone)) ok = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_EDGE_BOTTOM:
|
case E_ZONE_EDGE_BOTTOM:
|
||||||
if (E_ZONE_FLIP_DOWN(zone)) ok = 1;
|
if (E_ZONE_FLIP_DOWN(zone)) ok = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ok = 0;
|
ok = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -501,12 +550,14 @@ e_zone_flip_coords_handle(E_Zone *zone, int x, int y)
|
||||||
zone->flip.ev = zev;
|
zone->flip.ev = zev;
|
||||||
zone->flip.bind = bind;
|
zone->flip.bind = bind;
|
||||||
zone->flip.switching = 1;
|
zone->flip.switching = 1;
|
||||||
bind->timer = ecore_timer_add(((double) bind->delay), _e_zone_cb_edge_timer, zone);
|
bind->timer = ecore_timer_add(((double)bind->delay), _e_zone_cb_edge_timer, zone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_zone_desk_count_set(E_Zone *zone, int x_count, int y_count)
|
e_zone_desk_count_set(E_Zone *zone,
|
||||||
|
int x_count,
|
||||||
|
int y_count)
|
||||||
{
|
{
|
||||||
E_Desk **new_desks;
|
E_Desk **new_desks;
|
||||||
E_Desk *desk, *new_desk;
|
E_Desk *desk, *new_desk;
|
||||||
|
@ -619,7 +670,9 @@ e_zone_desk_count_set(E_Zone *zone, int x_count, int y_count)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_zone_desk_count_get(E_Zone *zone, int *x_count, int *y_count)
|
e_zone_desk_count_get(E_Zone *zone,
|
||||||
|
int *x_count,
|
||||||
|
int *y_count)
|
||||||
{
|
{
|
||||||
E_OBJECT_CHECK(zone);
|
E_OBJECT_CHECK(zone);
|
||||||
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
|
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
|
||||||
|
@ -629,7 +682,9 @@ e_zone_desk_count_get(E_Zone *zone, int *x_count, int *y_count)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_zone_desk_flip_by(E_Zone *zone, int dx, int dy)
|
e_zone_desk_flip_by(E_Zone *zone,
|
||||||
|
int dx,
|
||||||
|
int dy)
|
||||||
{
|
{
|
||||||
E_OBJECT_CHECK(zone);
|
E_OBJECT_CHECK(zone);
|
||||||
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
|
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
|
||||||
|
@ -640,7 +695,9 @@ e_zone_desk_flip_by(E_Zone *zone, int dx, int dy)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_zone_desk_flip_to(E_Zone *zone, int x, int y)
|
e_zone_desk_flip_to(E_Zone *zone,
|
||||||
|
int x,
|
||||||
|
int y)
|
||||||
{
|
{
|
||||||
E_Desk *desk;
|
E_Desk *desk;
|
||||||
|
|
||||||
|
@ -657,16 +714,19 @@ e_zone_desk_flip_to(E_Zone *zone, int x, int y)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (x < 0) x = 0;
|
if (x < 0) x = 0;
|
||||||
else if (x >= zone->desk_x_count) x = zone->desk_x_count - 1;
|
else if (x >= zone->desk_x_count)
|
||||||
|
x = zone->desk_x_count - 1;
|
||||||
if (y < 0) y = 0;
|
if (y < 0) y = 0;
|
||||||
else if (y >= zone->desk_y_count) y = zone->desk_y_count - 1;
|
else if (y >= zone->desk_y_count)
|
||||||
|
y = zone->desk_y_count - 1;
|
||||||
}
|
}
|
||||||
desk = e_desk_at_xy_get(zone, x, y);
|
desk = e_desk_at_xy_get(zone, x, y);
|
||||||
if (desk) e_desk_show(desk);
|
if (desk) e_desk_show(desk);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_zone_desk_linear_flip_by(E_Zone *zone, int dx)
|
e_zone_desk_linear_flip_by(E_Zone *zone,
|
||||||
|
int dx)
|
||||||
{
|
{
|
||||||
E_OBJECT_CHECK(zone);
|
E_OBJECT_CHECK(zone);
|
||||||
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
|
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
|
||||||
|
@ -680,7 +740,8 @@ e_zone_desk_linear_flip_by(E_Zone *zone, int dx)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_zone_desk_linear_flip_to(E_Zone *zone, int x)
|
e_zone_desk_linear_flip_to(E_Zone *zone,
|
||||||
|
int x)
|
||||||
{
|
{
|
||||||
int y;
|
int y;
|
||||||
|
|
||||||
|
@ -776,6 +837,7 @@ e_zone_edge_new(E_Zone_Edge edge)
|
||||||
case E_ZONE_EDGE_NONE:
|
case E_ZONE_EDGE_NONE:
|
||||||
/* noop */
|
/* noop */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_EDGE_LEFT:
|
case E_ZONE_EDGE_LEFT:
|
||||||
if (!zone->edge.left)
|
if (!zone->edge.left)
|
||||||
{
|
{
|
||||||
|
@ -785,6 +847,7 @@ e_zone_edge_new(E_Zone_Edge edge)
|
||||||
ecore_x_window_show(zone->edge.left);
|
ecore_x_window_show(zone->edge.left);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_EDGE_RIGHT:
|
case E_ZONE_EDGE_RIGHT:
|
||||||
if (!zone->edge.right)
|
if (!zone->edge.right)
|
||||||
{
|
{
|
||||||
|
@ -794,6 +857,7 @@ e_zone_edge_new(E_Zone_Edge edge)
|
||||||
ecore_x_window_show(zone->edge.right);
|
ecore_x_window_show(zone->edge.right);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_EDGE_TOP:
|
case E_ZONE_EDGE_TOP:
|
||||||
if (!zone->edge.top)
|
if (!zone->edge.top)
|
||||||
{
|
{
|
||||||
|
@ -803,6 +867,7 @@ e_zone_edge_new(E_Zone_Edge edge)
|
||||||
ecore_x_window_show(zone->edge.top);
|
ecore_x_window_show(zone->edge.top);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_EDGE_BOTTOM:
|
case E_ZONE_EDGE_BOTTOM:
|
||||||
if (!zone->edge.bottom)
|
if (!zone->edge.bottom)
|
||||||
{
|
{
|
||||||
|
@ -812,6 +877,7 @@ e_zone_edge_new(E_Zone_Edge edge)
|
||||||
ecore_x_window_show(zone->edge.bottom);
|
ecore_x_window_show(zone->edge.bottom);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_EDGE_TOP_LEFT:
|
case E_ZONE_EDGE_TOP_LEFT:
|
||||||
if (!zone->corner.left_top)
|
if (!zone->corner.left_top)
|
||||||
{
|
{
|
||||||
|
@ -826,6 +892,7 @@ e_zone_edge_new(E_Zone_Edge edge)
|
||||||
ecore_x_window_show(zone->corner.top_left);
|
ecore_x_window_show(zone->corner.top_left);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_EDGE_TOP_RIGHT:
|
case E_ZONE_EDGE_TOP_RIGHT:
|
||||||
if (!zone->corner.top_right)
|
if (!zone->corner.top_right)
|
||||||
{
|
{
|
||||||
|
@ -842,6 +909,7 @@ e_zone_edge_new(E_Zone_Edge edge)
|
||||||
ecore_x_window_show(zone->corner.right_top);
|
ecore_x_window_show(zone->corner.right_top);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_EDGE_BOTTOM_RIGHT:
|
case E_ZONE_EDGE_BOTTOM_RIGHT:
|
||||||
if (!zone->corner.right_bottom)
|
if (!zone->corner.right_bottom)
|
||||||
{
|
{
|
||||||
|
@ -859,6 +927,7 @@ e_zone_edge_new(E_Zone_Edge edge)
|
||||||
ecore_x_window_show(zone->corner.bottom_right);
|
ecore_x_window_show(zone->corner.bottom_right);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_EDGE_BOTTOM_LEFT:
|
case E_ZONE_EDGE_BOTTOM_LEFT:
|
||||||
if (!zone->corner.bottom_left)
|
if (!zone->corner.bottom_left)
|
||||||
{
|
{
|
||||||
|
@ -904,40 +973,48 @@ e_zone_edge_free(E_Zone_Edge edge)
|
||||||
case E_ZONE_EDGE_NONE:
|
case E_ZONE_EDGE_NONE:
|
||||||
/* noop */
|
/* noop */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_EDGE_LEFT:
|
case E_ZONE_EDGE_LEFT:
|
||||||
if (zone->edge.left) ecore_x_window_free(zone->edge.left);
|
if (zone->edge.left) ecore_x_window_free(zone->edge.left);
|
||||||
zone->edge.left = 0;
|
zone->edge.left = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_EDGE_RIGHT:
|
case E_ZONE_EDGE_RIGHT:
|
||||||
if (zone->edge.right) ecore_x_window_free(zone->edge.right);
|
if (zone->edge.right) ecore_x_window_free(zone->edge.right);
|
||||||
zone->edge.right = 0;
|
zone->edge.right = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_EDGE_TOP:
|
case E_ZONE_EDGE_TOP:
|
||||||
if (zone->edge.top) ecore_x_window_free(zone->edge.top);
|
if (zone->edge.top) ecore_x_window_free(zone->edge.top);
|
||||||
zone->edge.top = 0;
|
zone->edge.top = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_EDGE_BOTTOM:
|
case E_ZONE_EDGE_BOTTOM:
|
||||||
if (zone->edge.bottom) ecore_x_window_free(zone->edge.bottom);
|
if (zone->edge.bottom) ecore_x_window_free(zone->edge.bottom);
|
||||||
zone->edge.bottom = 0;
|
zone->edge.bottom = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_EDGE_TOP_LEFT:
|
case E_ZONE_EDGE_TOP_LEFT:
|
||||||
if (zone->corner.left_top) ecore_x_window_free(zone->corner.left_top);
|
if (zone->corner.left_top) ecore_x_window_free(zone->corner.left_top);
|
||||||
if (zone->corner.top_left) ecore_x_window_free(zone->corner.top_left);
|
if (zone->corner.top_left) ecore_x_window_free(zone->corner.top_left);
|
||||||
zone->corner.left_top = 0;
|
zone->corner.left_top = 0;
|
||||||
zone->corner.top_left = 0;
|
zone->corner.top_left = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_EDGE_TOP_RIGHT:
|
case E_ZONE_EDGE_TOP_RIGHT:
|
||||||
if (zone->corner.top_right) ecore_x_window_free(zone->corner.top_right);
|
if (zone->corner.top_right) ecore_x_window_free(zone->corner.top_right);
|
||||||
if (zone->corner.right_top) ecore_x_window_free(zone->corner.right_top);
|
if (zone->corner.right_top) ecore_x_window_free(zone->corner.right_top);
|
||||||
zone->corner.top_right = 0;
|
zone->corner.top_right = 0;
|
||||||
zone->corner.right_top = 0;
|
zone->corner.right_top = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_EDGE_BOTTOM_RIGHT:
|
case E_ZONE_EDGE_BOTTOM_RIGHT:
|
||||||
if (zone->corner.right_bottom) ecore_x_window_free(zone->corner.right_bottom);
|
if (zone->corner.right_bottom) ecore_x_window_free(zone->corner.right_bottom);
|
||||||
if (zone->corner.bottom_right) ecore_x_window_free(zone->corner.bottom_right);
|
if (zone->corner.bottom_right) ecore_x_window_free(zone->corner.bottom_right);
|
||||||
zone->corner.right_bottom = 0;
|
zone->corner.right_bottom = 0;
|
||||||
zone->corner.bottom_right = 0;
|
zone->corner.bottom_right = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_EDGE_BOTTOM_LEFT:
|
case E_ZONE_EDGE_BOTTOM_LEFT:
|
||||||
if (zone->corner.bottom_left) ecore_x_window_free(zone->corner.bottom_left);
|
if (zone->corner.bottom_left) ecore_x_window_free(zone->corner.bottom_left);
|
||||||
if (zone->corner.left_bottom) ecore_x_window_free(zone->corner.left_bottom);
|
if (zone->corner.left_bottom) ecore_x_window_free(zone->corner.left_bottom);
|
||||||
|
@ -951,7 +1028,8 @@ e_zone_edge_free(E_Zone_Edge edge)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_zone_edge_win_layer_set(E_Zone *zone, int layer)
|
e_zone_edge_win_layer_set(E_Zone *zone,
|
||||||
|
int layer)
|
||||||
{
|
{
|
||||||
if (zone->corner.left_bottom) e_container_window_raise(zone->container, zone->corner.left_bottom, layer);
|
if (zone->corner.left_bottom) e_container_window_raise(zone->container, zone->corner.left_bottom, layer);
|
||||||
if (zone->corner.left_top) e_container_window_raise(zone->container, zone->corner.left_top, layer);
|
if (zone->corner.left_top) e_container_window_raise(zone->container, zone->corner.left_top, layer);
|
||||||
|
@ -1024,12 +1102,14 @@ _e_zone_useful_geometry_calc(E_Zone *zone)
|
||||||
case E_GADCON_ORIENT_HORIZ:
|
case E_GADCON_ORIENT_HORIZ:
|
||||||
case E_GADCON_ORIENT_VERT:
|
case E_GADCON_ORIENT_VERT:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_GADCON_ORIENT_TOP:
|
case E_GADCON_ORIENT_TOP:
|
||||||
case E_GADCON_ORIENT_CORNER_TL:
|
case E_GADCON_ORIENT_CORNER_TL:
|
||||||
case E_GADCON_ORIENT_CORNER_TR:
|
case E_GADCON_ORIENT_CORNER_TR:
|
||||||
if (y0 < shelf->h)
|
if (y0 < shelf->h)
|
||||||
y0 = shelf->h;
|
y0 = shelf->h;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_GADCON_ORIENT_BOTTOM:
|
case E_GADCON_ORIENT_BOTTOM:
|
||||||
case E_GADCON_ORIENT_CORNER_BL:
|
case E_GADCON_ORIENT_CORNER_BL:
|
||||||
case E_GADCON_ORIENT_CORNER_BR:
|
case E_GADCON_ORIENT_CORNER_BR:
|
||||||
|
@ -1037,12 +1117,14 @@ _e_zone_useful_geometry_calc(E_Zone *zone)
|
||||||
y1 = zone->h - shelf->h;
|
y1 = zone->h - shelf->h;
|
||||||
break;
|
break;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_GADCON_ORIENT_LEFT:
|
case E_GADCON_ORIENT_LEFT:
|
||||||
case E_GADCON_ORIENT_CORNER_LT:
|
case E_GADCON_ORIENT_CORNER_LT:
|
||||||
case E_GADCON_ORIENT_CORNER_LB:
|
case E_GADCON_ORIENT_CORNER_LB:
|
||||||
if (x0 < shelf->w)
|
if (x0 < shelf->w)
|
||||||
x0 = shelf->w;
|
x0 = shelf->w;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_GADCON_ORIENT_RIGHT:
|
case E_GADCON_ORIENT_RIGHT:
|
||||||
case E_GADCON_ORIENT_CORNER_RT:
|
case E_GADCON_ORIENT_CORNER_RT:
|
||||||
case E_GADCON_ORIENT_CORNER_RB:
|
case E_GADCON_ORIENT_CORNER_RB:
|
||||||
|
@ -1059,12 +1141,15 @@ _e_zone_useful_geometry_calc(E_Zone *zone)
|
||||||
zone->useful_geometry.dirty = 0;
|
zone->useful_geometry.dirty = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get (or calculate) the useful (or free, without any shelves) area.
|
* Get (or calculate) the useful (or free, without any shelves) area.
|
||||||
*/
|
*/
|
||||||
EAPI void
|
EAPI void
|
||||||
e_zone_useful_geometry_get(E_Zone *zone, int *x, int *y, int *w, int *h)
|
e_zone_useful_geometry_get(E_Zone *zone,
|
||||||
|
int *x,
|
||||||
|
int *y,
|
||||||
|
int *w,
|
||||||
|
int *h)
|
||||||
{
|
{
|
||||||
E_OBJECT_CHECK(zone);
|
E_OBJECT_CHECK(zone);
|
||||||
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
|
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
|
||||||
|
@ -1190,7 +1275,10 @@ _e_zone_free(E_Zone *zone)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_zone_cb_bg_mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
_e_zone_cb_bg_mouse_down(void *data,
|
||||||
|
Evas *evas __UNUSED__,
|
||||||
|
Evas_Object *obj __UNUSED__,
|
||||||
|
void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Zone *zone;
|
E_Zone *zone;
|
||||||
|
|
||||||
|
@ -1220,7 +1308,10 @@ _e_zone_cb_bg_mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj __U
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_zone_cb_bg_mouse_up(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
_e_zone_cb_bg_mouse_up(void *data,
|
||||||
|
Evas *evas __UNUSED__,
|
||||||
|
Evas_Object *obj __UNUSED__,
|
||||||
|
void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Zone *zone;
|
E_Zone *zone;
|
||||||
|
|
||||||
|
@ -1254,7 +1345,8 @@ _e_zone_cb_bg_mouse_up(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNU
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_zone_event_zone_desk_count_set_free(void *data __UNUSED__, void *ev)
|
_e_zone_event_zone_desk_count_set_free(void *data __UNUSED__,
|
||||||
|
void *ev)
|
||||||
{
|
{
|
||||||
E_Event_Zone_Desk_Count_Set *e;
|
E_Event_Zone_Desk_Count_Set *e;
|
||||||
|
|
||||||
|
@ -1264,7 +1356,9 @@ _e_zone_event_zone_desk_count_set_free(void *data __UNUSED__, void *ev)
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_zone_cb_mouse_in(void *data, int type __UNUSED__, void *event)
|
_e_zone_cb_mouse_in(void *data,
|
||||||
|
int type __UNUSED__,
|
||||||
|
void *event)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Mouse_In *ev;
|
Ecore_X_Event_Mouse_In *ev;
|
||||||
E_Event_Zone_Edge *zev;
|
E_Event_Zone_Edge *zev;
|
||||||
|
@ -1290,7 +1384,9 @@ _e_zone_cb_mouse_in(void *data, int type __UNUSED__, void *event)
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_zone_cb_mouse_out(void *data, int type __UNUSED__, void *event)
|
_e_zone_cb_mouse_out(void *data,
|
||||||
|
int type __UNUSED__,
|
||||||
|
void *event)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Mouse_Out *ev;
|
Ecore_X_Event_Mouse_Out *ev;
|
||||||
E_Event_Zone_Edge *zev;
|
E_Event_Zone_Edge *zev;
|
||||||
|
@ -1315,7 +1411,9 @@ _e_zone_cb_mouse_out(void *data, int type __UNUSED__, void *event)
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_zone_cb_mouse_down(void *data, int type __UNUSED__, void *event)
|
_e_zone_cb_mouse_down(void *data,
|
||||||
|
int type __UNUSED__,
|
||||||
|
void *event)
|
||||||
{
|
{
|
||||||
Ecore_Event_Mouse_Button *ev;
|
Ecore_Event_Mouse_Button *ev;
|
||||||
E_Event_Zone_Edge *zev;
|
E_Event_Zone_Edge *zev;
|
||||||
|
@ -1340,7 +1438,9 @@ _e_zone_cb_mouse_down(void *data, int type __UNUSED__, void *event)
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_zone_cb_mouse_up(void *data, int type __UNUSED__, void *event)
|
_e_zone_cb_mouse_up(void *data,
|
||||||
|
int type __UNUSED__,
|
||||||
|
void *event)
|
||||||
{
|
{
|
||||||
Ecore_Event_Mouse_Button *ev;
|
Ecore_Event_Mouse_Button *ev;
|
||||||
E_Event_Zone_Edge *zev;
|
E_Event_Zone_Edge *zev;
|
||||||
|
@ -1365,7 +1465,9 @@ _e_zone_cb_mouse_up(void *data, int type __UNUSED__, void *event)
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_zone_cb_mouse_move(void *data, int type __UNUSED__, void *event)
|
_e_zone_cb_mouse_move(void *data,
|
||||||
|
int type __UNUSED__,
|
||||||
|
void *event)
|
||||||
{
|
{
|
||||||
Ecore_Event_Mouse_Move *ev;
|
Ecore_Event_Mouse_Move *ev;
|
||||||
E_Event_Zone_Edge *zev;
|
E_Event_Zone_Edge *zev;
|
||||||
|
@ -1389,7 +1491,9 @@ _e_zone_cb_mouse_move(void *data, int type __UNUSED__, void *event)
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_zone_cb_desk_after_show(void *data, int type __UNUSED__, void *event)
|
_e_zone_cb_desk_after_show(void *data,
|
||||||
|
int type __UNUSED__,
|
||||||
|
void *event)
|
||||||
{
|
{
|
||||||
E_Event_Desk_Show *ev;
|
E_Event_Desk_Show *ev;
|
||||||
E_Zone *zone;
|
E_Zone *zone;
|
||||||
|
@ -1428,7 +1532,8 @@ _e_zone_cb_edge_timer(void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_zone_event_move_resize_free(void *data __UNUSED__, void *ev)
|
_e_zone_event_move_resize_free(void *data __UNUSED__,
|
||||||
|
void *ev)
|
||||||
{
|
{
|
||||||
E_Event_Zone_Move_Resize *e;
|
E_Event_Zone_Move_Resize *e;
|
||||||
|
|
||||||
|
@ -1438,7 +1543,8 @@ _e_zone_event_move_resize_free(void *data __UNUSED__, void *ev)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_zone_event_add_free(void *data __UNUSED__, void *ev)
|
_e_zone_event_add_free(void *data __UNUSED__,
|
||||||
|
void *ev)
|
||||||
{
|
{
|
||||||
E_Event_Zone_Add *e;
|
E_Event_Zone_Add *e;
|
||||||
|
|
||||||
|
@ -1448,7 +1554,8 @@ _e_zone_event_add_free(void *data __UNUSED__, void *ev)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_zone_event_del_free(void *data __UNUSED__, void *ev)
|
_e_zone_event_del_free(void *data __UNUSED__,
|
||||||
|
void *ev)
|
||||||
{
|
{
|
||||||
E_Event_Zone_Del *e;
|
E_Event_Zone_Del *e;
|
||||||
|
|
||||||
|
@ -1472,7 +1579,8 @@ _e_zone_object_del_attach(void *o)
|
||||||
}
|
}
|
||||||
|
|
||||||
static E_Zone_Edge
|
static E_Zone_Edge
|
||||||
_e_zone_detect_edge(E_Zone *zone, Ecore_X_Window win)
|
_e_zone_detect_edge(E_Zone *zone,
|
||||||
|
Ecore_X_Window win)
|
||||||
{
|
{
|
||||||
E_Zone_Edge edge = E_ZONE_EDGE_NONE;
|
E_Zone_Edge edge = E_ZONE_EDGE_NONE;
|
||||||
|
|
||||||
|
@ -1548,3 +1656,4 @@ _e_zone_edge_move_resize(E_Zone *zone)
|
||||||
ecore_x_window_move_resize(zone->corner.bottom_left,
|
ecore_x_window_move_resize(zone->corner.bottom_left,
|
||||||
zone->x + zone->w - cw - 2, zone->y + zone->h - 1, cw, 1);
|
zone->x + zone->w - cw - 2, zone->y + zone->h - 1, cw, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue