From: <enl...@li...> - 2005-03-11 00:33:53
|
Enlightenment CVS committal Author : handyande Project : e17 Module : apps/e Dir : e17/apps/e/src/bin Modified Files: e_border.c e_border.h Log Message: Code freeze, yes etc etc this was really annoying me and in a way was a bug anyhow.... =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v retrieving revision 1.105 retrieving revision 1.106 diff -u -3 -r1.105 -r1.106 --- e_border.c 7 Mar 2005 16:31:30 -0000 1.105 +++ e_border.c 10 Mar 2005 23:54:48 -0000 1.106 @@ -79,6 +79,8 @@ static void _e_border_event_border_move_free(void *data, void *ev); static void _e_border_event_border_show_free(void *data, void *ev); static void _e_border_event_border_hide_free(void *data, void *ev); +static void _e_border_event_border_iconify_free(void *data, void *ev); +static void _e_border_event_border_uniconify_free(void *data, void *ev); static void _e_border_event_border_stick_free(void *data, void *ev); static void _e_border_event_border_unstick_free(void *data, void *ev); @@ -108,6 +110,8 @@ int E_EVENT_BORDER_MOVE = 0; int E_EVENT_BORDER_SHOW = 0; int E_EVENT_BORDER_HIDE = 0; +int E_EVENT_BORDER_ICONIFY = 0; +int E_EVENT_BORDER_UNICONIFY = 0; int E_EVENT_BORDER_STICK = 0; int E_EVENT_BORDER_UNSTICK = 0; @@ -147,6 +151,8 @@ E_EVENT_BORDER_MOVE = ecore_event_type_new(); E_EVENT_BORDER_SHOW = ecore_event_type_new(); E_EVENT_BORDER_HIDE = ecore_event_type_new(); + E_EVENT_BORDER_ICONIFY = ecore_event_type_new(); + E_EVENT_BORDER_UNICONIFY = ecore_event_type_new(); E_EVENT_BORDER_STICK = ecore_event_type_new(); E_EVENT_BORDER_UNSTICK = ecore_event_type_new(); @@ -864,6 +870,8 @@ void e_border_iconify(E_Border *bd) { + E_Event_Border_Iconify *ev; + unsigned int iconic; E_OBJECT_CHECK(bd); E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE); @@ -877,12 +885,18 @@ iconic = 1; e_hints_window_iconic_set(bd->client.win); ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_MAPPED, &iconic, 1); + + ev = E_NEW(E_Event_Border_Iconify, 1); + ev->border = bd; + e_object_ref(E_OBJECT(bd)); + ecore_event_add(E_EVENT_BORDER_ICONIFY, ev, _e_border_event_border_iconify_free, NULL); } void e_border_uniconify(E_Border *bd) { E_Desk *desk; + E_Event_Border_Uniconify *ev; unsigned int iconic; E_OBJECT_CHECK(bd); @@ -901,6 +915,12 @@ } iconic = 0; ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_MAPPED, &iconic, 1); + + ev = E_NEW(E_Event_Border_Uniconify, 1); + ev->border = bd; + e_object_ref(E_OBJECT(bd)); + ecore_event_add(E_EVENT_BORDER_UNICONIFY, ev, _e_border_event_border_uniconify_free, NULL); + } void @@ -3209,6 +3229,26 @@ } static void +_e_border_event_border_iconify_free(void *data, void *ev) +{ + E_Event_Border_Iconify *e; + + e = ev; + e_object_unref(E_OBJECT(e->border)); + free(e); +} + +static void +_e_border_event_border_uniconify_free(void *data, void *ev) +{ + E_Event_Border_Uniconify *e; + + e = ev; + e_object_unref(E_OBJECT(e->border)); + free(e); +} + +static void _e_border_event_border_stick_free(void *data, void *ev) { E_Event_Border_Stick *e; =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -3 -r1.28 -r1.29 --- e_border.h 15 Feb 2005 12:11:31 -0000 1.28 +++ e_border.h 10 Mar 2005 23:54:49 -0000 1.29 @@ -27,6 +27,8 @@ typedef struct _E_Event_Border_Remove E_Event_Border_Remove; typedef struct _E_Event_Border_Show E_Event_Border_Show; typedef struct _E_Event_Border_Hide E_Event_Border_Hide; +typedef struct _E_Event_Border_Iconify E_Event_Border_Iconify; +typedef struct _E_Event_Border_Uniconify E_Event_Border_Uniconify; typedef struct _E_Event_Border_Stick E_Event_Border_Stick; typedef struct _E_Event_Border_Unstick E_Event_Border_Unstick; typedef struct _E_Event_Border_Zone_Set E_Event_Border_Zone_Set; @@ -239,6 +241,16 @@ E_Border *border; }; +struct _E_Event_Border_Iconify +{ + E_Border *border; +}; + +struct _E_Event_Border_Uniconify +{ + E_Border *border; +}; + struct _E_Event_Border_Stick { E_Border *border; @@ -302,6 +314,8 @@ extern EAPI int E_EVENT_BORDER_SHOW; extern EAPI int E_EVENT_BORDER_HIDE; extern EAPI int E_EVENT_BORDER_REMOVE; +extern EAPI int E_EVENT_BORDER_ICONIFY; +extern EAPI int E_EVENT_BORDER_UNICONIFY; extern EAPI int E_EVENT_BORDER_STICK; extern EAPI int E_EVENT_BORDER_UNSTICK; extern EAPI int E_EVENT_BORDER_ZONE_SET; |