Enlightenment CVS committal
Author : rephorm
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_border.h e_border.c
Log Message:
the start of minimize / maximize actions.
don't allow resize while shaded.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- e_border.h 11 Dec 2004 04:02:26 -0000 1.7
+++ e_border.h 18 Dec 2004 05:47:08 -0000 1.8
@@ -114,12 +114,18 @@
unsigned char new_client : 1;
unsigned char re_manage : 1;
unsigned char shaded : 1;
+ unsigned char maximized : 1;
+ unsigned char minimized : 1;
unsigned char changed : 1;
unsigned char ignore_first_unmap;
unsigned char resize_mode;
-
+
+ struct {
+ int x, y, w, h;
+ } saved;
+
struct {
unsigned int visible : 1;
unsigned int pos : 1;
@@ -151,6 +157,10 @@
EAPI void e_border_focus_set(E_Border *bd, int focus, int set);
EAPI void e_border_shade(E_Border *bd);
EAPI void e_border_unshade(E_Border *bd);
+EAPI void e_border_maximize(E_Border *bd);
+EAPI void e_border_unmaximize(E_Border *bd);
+EAPI void e_border_minimize(E_Border *bd);
+EAPI void e_border_unminimize(E_Border *bd);
EAPI E_Border *e_border_find_by_client_window(Ecore_X_Window win);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- e_border.c 15 Dec 2004 11:48:38 -0000 1.18
+++ e_border.c 18 Dec 2004 05:47:08 -0000 1.19
@@ -389,6 +389,8 @@
bd->shaded = 1;
bd->changes.shaded = 1;
bd->changed = 1;
+
+ edje_object_signal_emit(bd->bg_object, "shade", "");
}
}
@@ -404,9 +406,86 @@
bd->shaded = 0;
bd->changes.shaded = 1;
bd->changed = 1;
+
+ edje_object_signal_emit(bd->bg_object, "unshade", "");
+ }
+}
+
+void
+e_border_maximize(E_Border *bd)
+{
+ E_OBJECT_CHECK(bd);
+ if (!bd->maximized)
+ {
+ printf("MAXIMIZE!!\n");
+ bd->saved.x = bd->x;
+ bd->saved.y = bd->y;
+ bd->saved.w = bd->w;
+ bd->saved.h = bd->h;
+
+ /* FIXME maximize intelligently */
+ e_border_move_resize(bd, 0, 0, bd->container->w, bd->container->h);
+ bd->maximized = 1;
+ bd->changes.pos = 1;
+ bd->changes.size = 1;
+ bd->changed = 1;
+
+ edje_object_signal_emit(bd->bg_object, "maximize", "");
}
}
+void
+e_border_unmaximize(E_Border *bd)
+{
+ E_OBJECT_CHECK(bd);
+ if (bd->maximized)
+ {
+ printf("UNMAXIMIZE!!\n");
+ e_border_move_resize(bd, bd->saved.x, bd->saved.y, bd->saved.w,
bd->saved.h);
+
+ bd->maximized = 0;
+ bd->changes.pos = 1;
+ bd->changes.size = 1;
+ bd->changed = 1;
+
+ edje_object_signal_emit(bd->bg_object, "unmaximize", "");
+ }
+}
+
+void
+e_border_minimize(E_Border *bd)
+{
+ E_OBJECT_CHECK(bd);
+ if (!bd->minimized)
+ {
+ printf("MINIMIZE!!\n");
+
+ /* FIXME set hints, etc */
+ e_border_hide(bd);
+
+ bd->minimized = 1;
+
+ edje_object_signal_emit(bd->bg_object, "minimize", "");
+ }
+}
+
+void
+e_border_unminimize(E_Border *bd)
+{
+ E_OBJECT_CHECK(bd);
+ if (bd->minimized)
+ {
+ printf("UNMINIMIZE!!\n");
+ /* FIXME set hints, etc */
+ e_border_show(bd);
+
+ bd->minimized = 1;
+
+ edje_object_signal_emit(bd->bg_object, "unminimize", "");
+ }
+}
+
+
E_Border *
e_border_find_by_client_window(Ecore_X_Window win)
{
@@ -841,6 +920,9 @@
E_Border *bd;
bd = data;
+
+ if (bd->shaded) return;
+
bd->resize_mode = RESIZE_TL;
_e_border_moveinfo_gather(bd, source);
GRAV_SET(bd, ECORE_X_GRAVITY_SE);
@@ -852,6 +934,9 @@
E_Border *bd;
bd = data;
+
+ if (bd->shaded) return;
+
bd->resize_mode = RESIZE_T;
_e_border_moveinfo_gather(bd, source);
GRAV_SET(bd, ECORE_X_GRAVITY_S);
@@ -864,6 +949,9 @@
E_Border *bd;
bd = data;
+
+ if (bd->shaded) return;
+
bd->resize_mode = RESIZE_TR;
_e_border_moveinfo_gather(bd, source);
GRAV_SET(bd, ECORE_X_GRAVITY_SW);
@@ -875,6 +963,9 @@
E_Border *bd;
bd = data;
+
+ if (bd->shaded) return;
+
bd->resize_mode = RESIZE_R;
_e_border_moveinfo_gather(bd, source);
GRAV_SET(bd, ECORE_X_GRAVITY_W);
@@ -886,6 +977,9 @@
E_Border *bd;
bd = data;
+
+ if (bd->shaded) return;
+
bd->resize_mode = RESIZE_BR;
_e_border_moveinfo_gather(bd, source);
GRAV_SET(bd, ECORE_X_GRAVITY_NW);
@@ -897,6 +991,9 @@
E_Border *bd;
bd = data;
+
+ if (bd->shaded) return;
+
bd->resize_mode = RESIZE_B;
_e_border_moveinfo_gather(bd, source);
GRAV_SET(bd, ECORE_X_GRAVITY_N);
@@ -908,6 +1005,9 @@
E_Border *bd;
bd = data;
+
+ if (bd->shaded) return;
+
bd->resize_mode = RESIZE_BL;
_e_border_moveinfo_gather(bd, source);
GRAV_SET(bd, ECORE_X_GRAVITY_NE);
@@ -919,6 +1019,9 @@
E_Border *bd;
bd = data;
+
+ if (bd->shaded) return;
+
bd->resize_mode = RESIZE_L;
_e_border_moveinfo_gather(bd, source);
GRAV_SET(bd, ECORE_X_GRAVITY_E);
@@ -931,6 +1034,9 @@
int x, y;
bd = data;
+
+ if (bd->shaded) return;
+
_e_border_resize_handle(bd);
bd->resize_mode = RESIZE_NONE;
bd->changes.reset_gravity = 1;
@@ -956,11 +1062,26 @@
e_object_del(E_OBJECT(bd));
}
}
+
else if (!strcmp(source, "shade"))
{
if (bd->shaded) e_border_unshade(bd);
else e_border_shade(bd);
}
+
+ else if (!strcmp(source, "maximize"))
+ {
+ if (bd->maximized) e_border_unmaximize(bd);
+ else e_border_maximize(bd);
+ }
+
+ else if (!strcmp(source, "minimize"))
+ {
+ if (bd->minimized) e_border_unminimize(bd);
+ else e_border_minimize(bd);
+ }
+
+
}
static int
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs