2 pending patches in my inbox.


			
			
				devs/princeamd/enlightenment-0.17-elive
			
			
		
Carsten Haitzler 17 years ago
parent d3d92eb719
commit 5f71f7acf5
  1. 4
      TODO
  2. 1
      configure.in
  3. 1
      data/themes/Makefile.am
  4. 1
      data/themes/default.edc
  5. 275
      data/themes/default_itray.edc
  6. 101
      src/bin/e_border.c
  7. 5
      src/bin/e_gadman.h
  8. 867
      src/bin/e_maximize.c
  9. 1
      src/modules/Makefile.am
  10. 23
      src/modules/battery/e_mod_config.c
  11. 51
      src/modules/battery/e_mod_main.c
  12. 1
      src/modules/battery/e_mod_main.h
  13. 14
      src/modules/clock/e_mod_config.c
  14. 56
      src/modules/clock/e_mod_main.c
  15. 2
      src/modules/clock/e_mod_main.h
  16. 68
      src/modules/cpufreq/e_mod_main.c
  17. 1
      src/modules/cpufreq/e_mod_main.h
  18. 24
      src/modules/ibar/e_mod_config.c
  19. 20
      src/modules/ibar/e_mod_main.c
  20. 1
      src/modules/ibar/e_mod_main.h
  21. 22
      src/modules/ibox/e_mod_config.c
  22. 21
      src/modules/ibox/e_mod_main.c
  23. 1
      src/modules/ibox/e_mod_main.h
  24. 28
      src/modules/itray/Makefile.am
  25. 237
      src/modules/itray/e_mod_config.c
  26. 8
      src/modules/itray/e_mod_config.h
  27. 1196
      src/modules/itray/e_mod_main.c
  28. 91
      src/modules/itray/e_mod_main.h
  29. BIN
      src/modules/itray/module_icon.png
  30. 23
      src/modules/pager/e_mod_config.c
  31. 50
      src/modules/pager/e_mod_main.c
  32. 2
      src/modules/pager/e_mod_main.h
  33. 4
      src/modules/start/Makefile.am
  34. 102
      src/modules/start/e_mod_config.c
  35. 8
      src/modules/start/e_mod_config.h
  36. 98
      src/modules/start/e_mod_main.c
  37. 4
      src/modules/start/e_mod_main.h
  38. 25
      src/modules/temperature/e_mod_config.c
  39. 54
      src/modules/temperature/e_mod_main.c
  40. 1
      src/modules/temperature/e_mod_main.h

@ -8,6 +8,9 @@ Some of the things (in very short form) that need to be done to E17...
BUGS / FIXES
-------------------------------------------------------------------------------
* BUG: edge flip for desktops still active if turned off when dragging a window
off the desktop - either a separate config value (recommended) or turn it
off for window dragging too
* BUG: general settings is too... general
* BUG: desktop settings is missing preview
* BUG: modules need to destroy config dialogs on shutdown (otherwise - segv!)
@ -126,6 +129,7 @@ Some of the things (in very short form) that need to be done to E17...
"NICE TO HAVE" FEATURES
-------------------------------------------------------------------------------
* winlist and exebuf can let the mouse select items
* option to NOT raise on focus in click to focus
* switch to desktop of a new window if it opens on another desktop than the
current one

@ -296,6 +296,7 @@ src/modules/battery/Makefile
src/modules/temperature/Makefile
src/modules/cpufreq/Makefile
src/modules/ibox/Makefile
src/modules/itray/Makefile
src/modules/start/Makefile
src/modules/randr/Makefile
src/preload/Makefile

@ -28,6 +28,7 @@ default_temperature.edc \
default_error.edc \
default_cpufreq.edc \
default_ibox.edc \
default_itray.edc \
default_start.edc \
default_winlist.edc \
default_transitions.edc \

@ -36,6 +36,7 @@ collections {
#include "default_error.edc"
#include "default_cpufreq.edc"
#include "default_ibox.edc"
#include "default_itray.edc"
#include "default_start.edc"
#include "default_winlist.edc"
#include "default_transitions.edc"

@ -0,0 +1,275 @@
images {
image: "e17_ibar_bg_h.png" COMP;
image: "e17_ibar_bg_v.png" COMP;
image: "e17_ibar_lamp_d.png" COMP;
image: "e17_ibar_lamp_l.png" COMP;
image: "e17_ibar_lamp_r.png" COMP;
image: "e17_ibar_lamp_u.png" COMP;
image: "e17_ibar_over_h.png" COMP;
image: "e17_ibar_over_v.png" COMP;
}
group {
name: "modules/itray/main";
data {
// item: "item_list", "item item2 item3";
}
script {
public orient;
}
parts {
part {
name: "background";
mouse_events: 1;
description {
state: "default" 0.0;
rel1 {
to: "overlay";
}
rel2 {
to: "overlay";
}
image {
normal: "e17_ibar_bg_h.png";
border: 6 6 6 6;
}
fill {
smooth: 0;
}
}
description {
state: "vert" 0.0;
inherit: "default" 0.0;
image {
normal: "e17_ibar_bg_v.png";
}
}
}
part {
name: "items_clip";
type: RECT;
mouse_events: 0;
description {
state: "default" 0.0;
rel1 {
to: "background";
offset: 4 4;
}
rel2 {
to: "background";
offset: -5 -5;
}
color: 255 255 255 255;
}
}
part {
name: "items";
type: SWALLOW;
mouse_events: 0;
clip_to: "items_clip";
description {
state: "default" 0.0;
align: 0.5 0.5;
rel1 {
offset: 4 4;
}
rel2 {
offset: -5 -5;
}
color: 0 0 0 0;
}
description {
state: "top" 0.0;
inherit: "default" 0.0;
}
description {
state: "left" 0.0;
inherit: "default" 0.0;
}
description {
state: "right" 0.0;
inherit: "default" 0.0;
}
}
part {
name: "tray";
type: SWALLOW;
mouse_events: 0;
description {
state: "default" 0.0;
align: 0.5 0.5;
rel1 { offset: 7 6; }
rel2 { offset: -7 -6; }
color: 0 0 255 64;
}
}
part {
name: "overlay";
mouse_events: 0;
description {
state: "default" 0.0;
image {
normal: "e17_ibar_over_h.png";
border: 13 13 13 13;
middle: 0;
}
fill {
smooth: 0;
}
}
description {
state: "top" 0.0;
inherit: "default" 0.0;
}
description {
state: "left" 0.0;
inherit: "default" 0.0;
}
description {
state: "right" 0.0;
inherit: "default" 0.0;
}
}
part {
name: "inn";
type: RECT;
repeat_events: 1;
description {
state: "default" 0.0;
color: 0 0 0 0;
}
}
}
programs {
program {
name: "orient";
signal: "set_orientation";
source: "*";
script {
// sig, src
if (!strcmp(src, "left")) {
set_int(orient, 0);
set_state(PART:"background", "vert", 0.0);
set_state(PART:"overlay", "left", 0.0);
set_state(PART:"items", "left", 0.0);
}
else if (!strcmp(src, "right")) {
set_int(orient, 1);
set_state(PART:"background", "vert", 0.0);
set_state(PART:"overlay", "right", 0.0);
set_state(PART:"items", "right", 0.0);
}
else if (!strcmp(src, "top")) {
set_int(orient, 2);
set_state(PART:"background", "default", 0.0);
set_state(PART:"overlay", "top", 0.0);
set_state(PART:"items", "top", 0.0);
}
else if (!strcmp(src, "bottom")) {
set_int(orient, 3);
set_state(PART:"background", "default", 0.0);
set_state(PART:"overlay", "default", 0.0);
set_state(PART:"items", "default", 0.0);
}
}
}
}
}
group {
name: "modules/itray/follower";
min: 56 56;
data {
// item: "item_list", "item item2 item3";
}
parts {
part {
name: "top";
mouse_events: 0;
description {
state: "default" 0.0;
rel1 {
relative: 0.0 0.0;
offset: 0 -14;
}
rel2 {
relative: 1.0 0.0;
offset: -1 26;
}
image {
normal: "e17_ibar_lamp_d.png";
}
}
description {
state: "top" 0.0;
rel1 {
relative: 0.0 1.0;
offset: 0 -26;
}
rel2 {
relative: 1.0 1.0;
offset: -1 14;
}
image {
normal: "e17_ibar_lamp_u.png";
}
}
description {
state: "right" 0.0;
rel1 {
relative: 0.0 0.0;
offset: -14 0;
}
rel2 {
relative: 0.0 1.0;
offset: 26 -1;
}
image {
normal: "e17_ibar_lamp_r.png";
}
}
description {
state: "left" 0.0;
rel1 {
relative: 1.0 0.0;
offset: -26 0;
}
rel2 {
relative: 1.0 1.0;
offset: 14 -1;
}
image {
normal: "e17_ibar_lamp_l.png";
}
}
}
program {
name: "orient";
signal: "set_orientation";
source: "bottom";
action: STATE_SET "default" 0.0;
target: "top";
}
program {
name: "orient2";
signal: "set_orientation";
source: "top";
action: STATE_SET "top" 0.0;
target: "top";
}
program {
name: "orient3";
signal: "set_orientation";
source: "left";
action: STATE_SET "left" 0.0;
target: "top";
}
program {
name: "orient4";
signal: "set_orientation";
source: "right";
action: STATE_SET "right" 0.0;
target: "top";
}
}
}

@ -1481,14 +1481,13 @@ e_border_maximize(E_Border *bd, E_Maximize max)
if ((bd->shaded) || (bd->shading)) return;
if (bd->fullscreen)
e_border_unfullscreen(bd);
if( bd->maximized == E_MAXIMIZE_VERTICAL && max == E_MAXIMIZE_VERTICAL )
if (bd->maximized == E_MAXIMIZE_VERTICAL && max == E_MAXIMIZE_VERTICAL)
; // ignore. we are already maximized vertical.
else if( bd->maximized == E_MAXIMIZE_HORIZONTAL && max == E_MAXIMIZE_HORIZONTAL )
else if (bd->maximized == E_MAXIMIZE_HORIZONTAL && max == E_MAXIMIZE_HORIZONTAL)
; // ignore. we are already maximized horizontaly.
else if ( ( bd->maximized == E_MAXIMIZE_NONE ||
bd->maximized == E_MAXIMIZE_VERTICAL ||
bd->maximized == E_MAXIMIZE_HORIZONTAL )
)
else if (( bd->maximized == E_MAXIMIZE_NONE ||
bd->maximized == E_MAXIMIZE_VERTICAL ||
bd->maximized == E_MAXIMIZE_HORIZONTAL))
{
int x1, y1, x2, y2;
int w, h;
@ -1499,13 +1498,13 @@ e_border_maximize(E_Border *bd, E_Maximize max)
return;
}
if( !bd->maximized ) // E_MAXIMIZE_NONE
{
bd->saved.x = bd->x;
bd->saved.y = bd->y;
bd->saved.w = bd->w;
bd->saved.h = bd->h;
}
if (!bd->maximized) // E_MAXIMIZE_NONE
{
bd->saved.x = bd->x;
bd->saved.y = bd->y;
bd->saved.w = bd->w;
bd->saved.h = bd->h;
}
e_hints_window_size_set(bd);
e_border_raise(bd);
@ -1582,13 +1581,13 @@ e_border_maximize(E_Border *bd, E_Maximize max)
e_border_move_resize(bd, x1, y1, w, h);
break;
case E_MAXIMIZE_VERTICAL:
x1 = bd->zone->x;
x1 = bd->x;
y1 = bd->zone->y;
x2 = bd->zone->x + bd->zone->w;
x2 = bd->x + bd->w;
y2 = bd->zone->y + bd->zone->h;
/* walk through all gadgets */
e_maximize_border_gadman_fill(bd, &x1, &y1, &x2, &y2);
e_maximize_border_gadman_fit(bd, &x1, &y1, &x2, &y2);
/* walk through docks and toolbars */
//e_maximize_border_dock_fit(bd, &x1, &y1, &x2, &y2);
@ -1604,12 +1603,12 @@ e_border_maximize(E_Border *bd, E_Maximize max)
break;
case E_MAXIMIZE_HORIZONTAL:
x1 = bd->zone->x;
y1 = bd->zone->y;
y1 = bd->y;
x2 = bd->zone->x + bd->zone->w;
y2 = bd->zone->y + bd->zone->h;
y2 = bd->y + bd->h;
/* walk through all gadgets */
e_maximize_border_gadman_fill(bd, &x1, &y1, &x2, &y2);
e_maximize_border_gadman_fit(bd, &x1, &y1, &x2, &y2);
/* walk through docks and toolbars */
//e_maximize_border_dock_fit(bd, &x1, &y1, &x2, &y2);
@ -1624,8 +1623,8 @@ e_border_maximize(E_Border *bd, E_Maximize max)
e_border_move_resize(bd,x1,y1,w,h);
break;
}
if( (bd->maximized == E_MAXIMIZE_HORIZONTAL && max == E_MAXIMIZE_VERTICAL) ||
(bd->maximized == E_MAXIMIZE_VERTICAL && max == E_MAXIMIZE_HORIZONTAL) )
if ((bd->maximized == E_MAXIMIZE_HORIZONTAL && max == E_MAXIMIZE_VERTICAL) ||
(bd->maximized == E_MAXIMIZE_VERTICAL && max == E_MAXIMIZE_HORIZONTAL))
bd->maximized = e_config->maximize_policy;
else
bd->maximized = max;
@ -1659,47 +1658,47 @@ e_border_unmaximize_vh(E_Border *bd, E_Maximize max)
case E_MAXIMIZE_SMART:
case E_MAXIMIZE_EXPAND:
case E_MAXIMIZE_FILL:
if( max == E_MAXIMIZE_VERTICAL )
{
bd->maximized = E_MAXIMIZE_NONE;
e_hints_window_maximized_set(bd, 0);
if (max == E_MAXIMIZE_VERTICAL)
{
bd->maximized = E_MAXIMIZE_NONE;
e_hints_window_maximized_set(bd, 0);
bd->maximized = E_MAXIMIZE_HORIZONTAL;
e_hints_window_maximized_set(bd, 1);
bd->maximized = E_MAXIMIZE_HORIZONTAL;
e_hints_window_maximized_set(bd, 1);
e_border_move_resize( bd, bd->x, bd->saved.y, bd->w, bd->saved.h);
e_hints_window_size_unset(bd);
e_border_move_resize(bd, bd->x, bd->saved.y, bd->w, bd->saved.h);
e_hints_window_size_unset(bd);
//edje_object_signal_emit(bd->bg_object, "unmaximize", "");
}
if( max == E_MAXIMIZE_HORIZONTAL )
{
bd->maximized = E_MAXIMIZE_NONE;
e_hints_window_maximized_set(bd, 0);
//edje_object_signal_emit(bd->bg_object, "unmaximize", "");
}
if (max == E_MAXIMIZE_HORIZONTAL)
{
bd->maximized = E_MAXIMIZE_NONE;
e_hints_window_maximized_set(bd, 0);
bd->maximized = E_MAXIMIZE_VERTICAL;
e_hints_window_maximized_set(bd, 1);
bd->maximized = E_MAXIMIZE_VERTICAL;
e_hints_window_maximized_set(bd, 1);
e_border_move_resize( bd, bd->saved.x, bd->y, bd->saved.w, bd->h);
e_hints_window_size_unset(bd);
e_border_move_resize(bd, bd->saved.x, bd->y, bd->saved.w, bd->h);
e_hints_window_size_unset(bd);
//edje_object_signal_emit(bd->bg_object, "unmaximize", "");
}
//edje_object_signal_emit(bd->bg_object, "unmaximize", "");
}
break;
case E_MAXIMIZE_VERTICAL:
if( max == E_MAXIMIZE_HORIZONTAL )
if (max == E_MAXIMIZE_HORIZONTAL)
; // do nothing in this case
if( max == E_MAXIMIZE_VERTICAL )
{
bd->maximized = E_MAXIMIZE_NONE;
e_hints_window_maximized_set(bd, 0);
if (max == E_MAXIMIZE_VERTICAL)
{
bd->maximized = E_MAXIMIZE_NONE;
e_hints_window_maximized_set(bd, 0);
e_border_move_resize( bd, bd->saved.x, bd->saved.y, bd->saved.w, bd->saved.h);
bd->saved.x = bd->saved.y = bd->saved.w = bd->saved.h = 0;
e_hints_window_size_unset(bd);
e_border_move_resize(bd, bd->saved.x, bd->saved.y, bd->saved.w, bd->saved.h);
bd->saved.x = bd->saved.y = bd->saved.w = bd->saved.h = 0;
e_hints_window_size_unset(bd);
edje_object_signal_emit(bd->bg_object, "unmaximize", "");
}
edje_object_signal_emit(bd->bg_object, "unmaximize", "");
}
break;
case E_MAXIMIZE_HORIZONTAL:
if( max == E_MAXIMIZE_VERTICAL )

@ -13,7 +13,10 @@ typedef enum _E_Gadman_Policy
E_GADMAN_POLICY_HSIZE = 1 << 9,
E_GADMAN_POLICY_VSIZE = 1 << 10,
E_GADMAN_POLICY_HMOVE = 1 << 11,
E_GADMAN_POLICY_VMOVE = 1 << 12
E_GADMAN_POLICY_VMOVE = 1 << 12,
/* more extra flags */
E_GADMAN_POLICY_ALLOW_OVERLAP = 1 << 15,
E_GADMAN_POLICY_ALWAYS_ON_TOP = 1 << 16 // not used yet
} E_Gadman_Policy;
typedef enum _E_Gadman_Change

@ -10,6 +10,15 @@ struct _E_Maximize_Rect
int x1, y1, x2, y2;
};
struct _m_zone
{
int x1;
int y1;
int x2;
int y2;
int area;
};
#define OBSTACLE(_x1, _y1, _x2, _y2) \
{ \
r = E_NEW(E_Maximize_Rect, 1); \
@ -19,61 +28,140 @@ struct _E_Maximize_Rect
static void _e_maximize_border_rects_fill(E_Border *bd, Evas_List *list, int *x1, int *y1, int *x2, int *y2);
static int _e_mzone_split(Evas_List **add_splits_to, struct _m_zone *mzone, E_Gadman_Client *gmc);
int _e_mzone_cb_square_reverse_sort(void *e1, void *e2);
int _e_mzone_cb_width_reverse_sort(void *e1, void *e2);
int _e_mzone_cb_height_reverse_sort(void *e1, void *e2); // not used yet
EAPI void
e_maximize_border_gadman_fit(E_Border *bd, int *x1, int *y1, int *x2, int *y2)
{
Evas_List *l;
int cx1, cx2, cy1, cy2;
int ii, jj;
Evas_List *l, *ll;
cx1 = bd->zone->x;
if (x1) cx1 = *x1;
cy1 = bd->zone->y;
if (y1) cy1 = *y1;
cx2 = bd->zone->x + bd->zone->w;
if (x2) cx2 = *x2;
Evas_List *mzones = NULL;
Evas_List *tmp_mzones = NULL;
cy2 = bd->zone->y + bd->zone->h;
if (y2) cy2 = *y2;
struct _m_zone *mzone = NULL;
struct _m_zone *mzone_split;
/* Find the smallest box */
for (l = bd->zone->container->gadman->clients; l; l = l->next)
{
E_Gadman_Client *gmc;
double ax, ay;
mzone = (struct _m_zone *)malloc(sizeof(struct _m_zone));
if (mzone == NULL)
return;
gmc = l->data;
if ((gmc->zone != bd->zone)) continue;
mzone->x1 = bd->zone->x;
if (x1) mzone->x1 = *x1;
mzone->y1 = bd->zone->y;
if (y1) mzone->y1 = *y1;
ax = gmc->ax;
ay = gmc->ay;
mzone->x2 = bd->zone->x + bd->zone->w;
if (x2) mzone->x2 = *x2;
if (((ax == 0.0) || (ax == 1.0)) &&
((ay == 0.0) || (ay == 1.0)))
mzone->y2 = bd->zone->y + bd->zone->h;
if (y2) mzone->y2 = *y2;
mzones = evas_list_append(mzones, mzone);
for(l = bd->zone->container->gadman->clients; l; l = l->next)
{
E_Gadman_Client *gmc;
gmc = l->data;
if (gmc->zone != bd->zone || gmc->policy & E_GADMAN_POLICY_ALLOW_OVERLAP) continue;
tmp_mzones = mzones;
mzones = NULL;
for (ll = tmp_mzones; ll; ll = ll->next)
{
int res;
mzone = ll->data;
res = _e_mzone_split(&mzones, mzone, gmc);
if (res == 0)
{
/* corner gadget */
/* Fake removal from one alignment :) */
if (gmc->w > gmc->h)
ax = 0.5;
else
ay = 0.5;
if(mzones == NULL)
mzones = evas_list_append(mzones, mzone);
else
evas_list_append(mzones , mzone);
ll->data = NULL;
}
else if (res == 2)
;
else if (res == -1)
; /* mem problems. Let ignor them yet */
if ((ax == 0.0) && (gmc->x + gmc->w) > cx1)
cx1 = (gmc->x + gmc->w);
else if ((ax == 1.0) && (gmc->x < cx2))
cx2 = gmc->x;
else if ((ay == 0.0) && ((gmc->y + gmc->h) > cy1))
cy1 = (gmc->y + gmc->h);
else if ((ay == 1.0) && (gmc->y < cy2))
cy2 = gmc->y;
}
if (ll->data != NULL)
{
free(ll->data);
ll->data = NULL;
}
}
evas_list_free(tmp_mzones);
tmp_mzones = NULL;
}
if (x1) *x1 = cx1;
if (y1) *y1 = cy1;
if (x2) *x2 = cx2;
if (y2) *y2 = cy2;
for (l = mzones; l; l = l->next)
{
mzone = l->data;
mzone->area = (mzone->x2 - mzone->x1) * (mzone->y2 - mzone->y1);
}
tmp_mzones = evas_list_sort(mzones, evas_list_count(mzones), _e_mzone_cb_square_reverse_sort);
mzones = NULL;
mzones = evas_list_append(mzones, tmp_mzones->data);
for (l = tmp_mzones->next; l; l = l->next)
{
if ( ((struct _m_zone *)l->data)->area ==
((struct _m_zone *)mzones->data)->area)
evas_list_append(mzones, l->data);
else
free(l->data);
}
tmp_mzones = evas_list_free(tmp_mzones);
tmp_mzones = NULL;
if (mzones != NULL && mzones->next == NULL)
{
mzone = mzones->data;
*x1 = mzone->x1;
*y1 = mzone->y1;
*x2 = mzone->x2;
*y2 = mzone->y2;
}
else if (mzones != NULL && mzones->next != NULL)
{
Evas_List *wl = NULL, *hl = NULL;
/* The use of *_width_reverse_sort or *_height_reverse_sort depends
* on the preferences of the user - what window he/she would like to
* have: (i) maximized verticaly or (ii) horisontaly.
*/
wl = evas_list_sort(mzones, evas_list_count(mzones), _e_mzone_cb_width_reverse_sort);
mzones = NULL;
// hl = evas_list_sort(mzones, -1, _e_mzone_cb_height_reverse_sort);
mzone = wl->data;
//mzone = hl->data;
*x1 = mzone->x1;
*y1 = mzone->y1;
*x2 = mzone->x2;
*y2 = mzone->y2;
// evas_list_free( wl );
// evas_list_free( hl );
mzones = wl;
}
for (l = mzones; l ; l = l->next)
if (l->data != NULL)
free(l->data);
mzones = evas_list_free(mzones);
}
EAPI void
@ -302,3 +390,698 @@ _e_maximize_border_rects_fill(E_Border *bd, Evas_List *rects, int *x1, int *y1,
if (x2) *x2 = cx2;
if (y2) *y2 = cy2;
}
int _e_mzone_split(Evas_List **add_splits_to, struct _m_zone *mzone, E_Gadman_Client *gmc)
{
int ii;
int mzone_splitted = 0;
struct _m_zone *mzone_split = NULL;
if (mzone == NULL || gmc == NULL)
return -1;
if ((mzone->x2 - mzone->x1) <= 0 || (mzone->y2 - mzone->y1) <= 0)
return 1;
if (gmc->x > mzone->x1 && gmc->y > mzone->y1 &&
gmc->x + gmc->w < mzone->x2 && gmc->y + gmc->h < mzone->y2)
{
mzone_splitted = 1;
for (ii = 0; ii < 8; ii ++)
{
mzone_split = (struct _m_zone *)malloc(sizeof(struct _m_zone));
if(mzone_split == NULL)
return -1;
switch(ii)
{
case 0:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = gmc->y;
break;
case 1:
mzone_split->x1 = gmc->x + gmc->w;
mzone_split->y1 = gmc->y;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = gmc->y + gmc->h;
break;
case 2:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = gmc->y + gmc->h;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
break;
case 3:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = gmc->y;
mzone_split->x2 = gmc->x;
mzone_split->y2 = gmc->y + gmc->h;
break;
case 4:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = gmc->x;
mzone_split->y2 = mzone->y2;
break;
case 5:
mzone_split->x1 = gmc->x;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = gmc->x + gmc->w;
mzone_split->y2 = gmc->y;
break;
case 6:
mzone_split->x1 = gmc->x + gmc->w;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
break;
case 7:
mzone_split->x1 = gmc->x;
mzone_split->y1 = gmc->y + gmc->h;
mzone_split->x2 = gmc->x + gmc->w;
mzone_split->y2 = mzone->y2;
break;
}
if (*add_splits_to == NULL)
*add_splits_to = evas_list_append(*add_splits_to, mzone_split);
else
evas_list_append(*add_splits_to, mzone_split);
}
} // if
else if (gmc->x + gmc->w > mzone->x1 && gmc->x + gmc->w < mzone->x2 &&
gmc->y + gmc->h > mzone->y1 && gmc->y + gmc->h < mzone->y2 &&
gmc->x <= mzone->x1 && gmc->y <= mzone->y1)
{
mzone_splitted = 1;
for (ii = 0; ii < 4; ii ++)
{
mzone_split = (struct _m_zone *)malloc(sizeof(struct _m_zone));
if (mzone_split == NULL)
return -1;
switch(ii)
{
case 0:
mzone_split->x1 = gmc->x + gmc->w;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = gmc->y + gmc->h;
break;
case 1:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = gmc->y + gmc->h;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
break;
case 2:
mzone_split->x1 = gmc->x + gmc->w;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
break;
case 3:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = gmc->y + gmc->h;
mzone_split->x2 = gmc->x + gmc->w;
mzone_split->y2 = mzone->y2;
break;
}
if (*add_splits_to == NULL)
*add_splits_to = evas_list_append(*add_splits_to, mzone_split);
else
evas_list_append(*add_splits_to, mzone_split);
}
}
else if (gmc->x > mzone->x1 && gmc->y <= mzone->y1 &&
gmc->x + gmc->w < mzone->x2 &&
gmc->y + gmc->h > mzone->y1 && gmc->y + gmc->h < mzone->y2)
{
mzone_splitted = 1;
for (ii = 0; ii < 6; ii ++)
{
mzone_split = (struct _m_zone *)malloc(sizeof(struct _m_zone));
if (mzone_split == NULL)
return -1;
switch(ii)
{
case 0:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = gmc->x;
mzone_split->y2 = gmc->y + gmc->h;
break;
case 1:
mzone_split->x1 = gmc->x + gmc->w;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = gmc->y + gmc->h;
break;
case 2:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = gmc->y + gmc->h;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
break;
case 3:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = gmc->x;
mzone_split->y2 = mzone->y2;
break;
case 4:
mzone_split->x1 = gmc->x;
mzone_split->y1 = gmc->y + gmc->h;
mzone_split->x2 = gmc->x + gmc->w;
mzone_split->y2 = mzone->y2;
break;
case 5:
mzone_split->x1 = gmc->x + gmc->w;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
break;
}
if (*add_splits_to == NULL)
*add_splits_to = evas_list_append(*add_splits_to, mzone_split);
else
evas_list_append(*add_splits_to, mzone_split);
}
}
else if (gmc->x > mzone->x1 && gmc->x < mzone->x2 &&
gmc->y + gmc->h > mzone->y1 && gmc->y + gmc->h < mzone->y2 &&
gmc->y <= mzone->y1 &&
gmc->x + gmc->w >= mzone->x2)
{
mzone_splitted = 1;
for (ii = 0; ii < 4; ii ++)
{
mzone_split = (struct _m_zone *)malloc(sizeof(struct _m_zone));
if (mzone_split == NULL)
return -1;
switch(ii)
{
case 0:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = gmc->x;
mzone_split->y2 = gmc->y + gmc->h;
break;
case 1:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = gmc->y + gmc->h;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
break;
case 2:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = gmc->x;
mzone_split->y2 = mzone->y2;
break;
case 3:
mzone_split->x1 = gmc->x;
mzone_split->y1 = gmc->y + gmc->h;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
break;
}
if (*add_splits_to == NULL)
*add_splits_to = evas_list_append(*add_splits_to, mzone_split);
else
evas_list_append(*add_splits_to, mzone_split);
}
}
else if (gmc->x > mzone->x1 && gmc->x < mzone->x2 &&
gmc->y > mzone->y1 &&
gmc->y + gmc->h < mzone->y2 &&
gmc->x + gmc->w >= mzone->x2)
{
mzone_splitted = 1;
for (ii = 0; ii < 6; ii ++)
{
mzone_split = (struct _m_zone *)malloc(sizeof(struct _m_zone));
if (mzone_split == NULL)
return -1;
switch(ii)
{
case 0:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = gmc->y;
break;
case 1:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = gmc->y;
mzone_split->x2 = gmc->x;
mzone_split->y2 = gmc->y + gmc->h;
break;
case 2:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = gmc->y + gmc->h;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
break;
case 3:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = gmc->x;
mzone_split->y2 = mzone->y2;
break;
case 4:
mzone_split->x1 = gmc->x;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = gmc->y;
break;
case 5:
mzone_split->x1 = gmc->x;
mzone_split->y1 = gmc->y + gmc->h;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
break;
}
if (*add_splits_to == NULL)
*add_splits_to = evas_list_append(*add_splits_to, mzone_split);
else
evas_list_append(*add_splits_to, mzone_split);
}
}
else if (gmc->x > mzone->x1 && gmc->x < mzone->x2 &&
gmc->y > mzone->y1 && gmc->y < mzone->y2 &&
gmc->x + gmc->w >= mzone->x2 &&
gmc->y + gmc->h >= mzone->y2)
{
mzone_splitted = 1;
for (ii = 0; ii < 4; ii ++)
{
mzone_split = (struct _m_zone *)malloc(sizeof(struct _m_zone));
if (mzone_split == NULL)
return -1;
switch(ii)
{
case 0:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = gmc->y;
break;
case 1:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = gmc->y;
mzone_split->x2 = gmc->x;
mzone_split->y2 = mzone->y2;
break;
case 2:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = gmc->x;
mzone_split->y2 = mzone->y2;
break;
case 3:
mzone_split->x1 = gmc->x;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = gmc->y;
break;
}
if (*add_splits_to == NULL)
*add_splits_to = evas_list_append(*add_splits_to, mzone_split);
else
evas_list_append(*add_splits_to, mzone_split);
}
}
else if (gmc->x > mzone->x1 &&
gmc->y > mzone->y1 && gmc->y < mzone->y2 &&
gmc->x + gmc->w < mzone->x2 &&
gmc->y + gmc->h >= mzone->y2)
{
mzone_splitted = 1;
for (ii = 0; ii < 6; ii ++)
{
mzone_split = (struct _m_zone *)malloc(sizeof(struct _m_zone));
if (mzone_split == NULL)
return -1;
switch(ii)
{
case 0:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = gmc->y;
break;
case 1:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = gmc->y;
mzone_split->x2 = gmc->x;
mzone_split->y2 = mzone->y2;
break;
case 2:
mzone_split->x1 = gmc->x + gmc->w;
mzone_split->y1 = gmc->y;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
break;
case 3:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = gmc->x;
mzone_split->y2 = mzone->y2;
break;
case 4:
mzone_split->x1 = gmc->x;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = gmc->x + gmc->w;
mzone_split->y2 = gmc->y;
break;
case 5:
mzone_split->x1 = gmc->x + gmc->w;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
break;
}
if(*add_splits_to == NULL)
*add_splits_to = evas_list_append(*add_splits_to, mzone_split);
else
evas_list_append(*add_splits_to, mzone_split);
}
}
else if (gmc->x <= mzone->x1 &&
gmc->y > mzone->y1 && gmc->y < mzone->y2 &&
gmc->x + gmc->w > mzone->x1 && gmc->x + gmc->w < mzone->x2 &&
gmc->y + gmc->h >= mzone->y2)
{
mzone_splitted = 1;
for (ii = 0; ii < 4; ii ++)
{
mzone_split = (struct _m_zone *)malloc(sizeof(struct _m_zone));
if (mzone_split == NULL)
return -1;
switch(ii)
{
case 0:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = gmc->y;
break;
case 1:
mzone_split->x1 = gmc->x + gmc->w;
mzone_split->y1 = gmc->y;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
break;
case 2:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = gmc->x + gmc->w;
mzone_split->y2 = gmc->y;
break;
case 3:
mzone_split->x1 = gmc->x + gmc->w;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
break;
}
if (*add_splits_to == NULL)
*add_splits_to = evas_list_append(*add_splits_to, mzone_split);
else
evas_list_append(*add_splits_to, mzone_split);
}
}
else if (gmc->x <= mzone->x1 &&
gmc->y > mzone->y1 &&
gmc->y + gmc->h < mzone->y2 &&
gmc->x + gmc->w > mzone->x1 && gmc->x + gmc->w < mzone->x2)
{
mzone_splitted = 1;
for (ii = 0; ii < 6; ii ++)
{
mzone_split = (struct _m_zone *)malloc(sizeof(struct _m_zone));
if (mzone_split == NULL)
return -1;
switch(ii)
{
case 0:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = gmc->y;
break;
case 1:
mzone_split->x1 = gmc->x + gmc->w;
mzone_split->y1 = gmc->y;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = gmc->y + gmc->h;
break;
case 2:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = gmc->y + gmc->h;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
break;
case 3:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = gmc->x + gmc->w;
mzone_split->y2 = gmc->y;
break;
case 4:
mzone_split->x1 = gmc->x + gmc->w;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
break;
case 5:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = gmc->y + gmc->h;
mzone_split->x2 = gmc->x + gmc->w;
mzone_split->y2 = mzone->y2;
break;
}
if (*add_splits_to == NULL)
*add_splits_to = evas_list_append(*add_splits_to, mzone_split);
else
evas_list_append(*add_splits_to, mzone_split);
}
}
else if (gmc->x <= mzone->x1 && gmc->y <= mzone->y1 &&
gmc->x + gmc->w >= mzone->x2 &&
gmc->y + gmc->h > mzone->y1 &&
gmc->y + gmc->h < mzone->y2)
{
mzone_splitted = 1;
mzone_split = (struct _m_zone *)malloc(sizeof(struct _m_zone));
if (mzone_split == NULL)
return -1;
mzone_split->x1 = mzone->x1;
mzone_split->y1 = gmc->y + gmc->h;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
if (*add_splits_to == NULL)
*add_splits_to = evas_list_append(*add_splits_to, mzone_split);
else
evas_list_append(*add_splits_to, mzone_split);
}
else if (gmc->x <= mzone->x1 &&
gmc->x + gmc->w >= mzone->x2 &&
gmc->y > mzone->y1 && gmc->y < mzone->y2)
{
mzone_splitted = 1;
for (ii = 0; ii < 2; ii ++)
{
mzone_split = (struct _m_zone *)malloc(sizeof(struct _m_zone));
if (mzone_split == NULL)
return -1;
switch(ii)
{
case 0:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = gmc->y;
break;
case 1:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = gmc->y + gmc->h;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
break;
}
if (*add_splits_to == NULL)
*add_splits_to = evas_list_append(*add_splits_to, mzone_split);
else
evas_list_append(*add_splits_to, mzone_split);
}
}
else if (gmc->x <= mzone->x1 &&
gmc->x + gmc->w >= mzone->x2 &&
gmc->y > mzone->y1 && gmc->y < mzone->y2 &&
gmc->y + gmc->h >= mzone->y2)
{
mzone_splitted = 1;
mzone_split = (struct _m_zone *)malloc(sizeof(struct _m_zone));
if (mzone_split == NULL)
return -1;
mzone_split->x1 = mzone->x1;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = gmc->y;
if (*add_splits_to == NULL)
*add_splits_to = evas_list_append(*add_splits_to, mzone_split);
else
evas_list_append(*add_splits_to, mzone_split);
}
else if (gmc->x <= mzone->x1 &&
gmc->y <= mzone->y1 &&
gmc->y + gmc->h >= mzone->y2 &&
gmc->x + gmc->w > mzone->x1 && gmc->x + gmc->w < mzone->x2)
{
mzone_splitted = 1;
mzone_split = (struct _m_zone *)malloc(sizeof(struct _m_zone));
if (mzone_split == NULL)
return -1;
mzone_split->x1 = gmc->x + gmc->w;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
if (*add_splits_to == NULL)
*add_splits_to = evas_list_append(*add_splits_to, mzone_split);
else
evas_list_append(*add_splits_to, mzone_split);
}
else if (gmc->x > mzone->x1 &&
gmc->x + gmc->w < mzone->x2 &&
gmc->y <= mzone->y1 &&
gmc->y + gmc->h >= mzone->y2)
{
mzone_splitted = 1;
for (ii = 0; ii < 2; ii ++)
{
mzone_split = (struct _m_zone *)malloc(sizeof(struct _m_zone));
if (mzone_split == NULL)
return -1;
switch(ii)
{
case 0:
mzone_split->x1 = mzone->x1;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = gmc->x;
mzone_split->y2 = mzone->y2;
break;
case 1:
mzone_split->x1 = gmc->x + gmc->w;
mzone_split->y1 = mzone->y1;
mzone_split->x2 = mzone->x2;
mzone_split->y2 = mzone->y2;
break;
}
if (*add_splits_to == NULL)
*add_splits_to = evas_list_append(*add_splits_to, mzone_split);
else
evas_list_append(*add_splits_to, mzone_split);
}
}
else if (gmc->x > mzone->x1 && gm