Enlightenment CVS committal Author : raster Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x Modified Files: Tag: SPLIT Ecore_X.h ecore_x.c ecore_x_events.c ecore_x_private.h Log Message: and the work goes on... its just to the pint where there's enough events to start doing something. now to make some basic window creation wrappers =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Attic/Ecore_X.h,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -3 -r1.1.2.8 -r1.1.2.9 --- Ecore_X.h 23 Jan 2003 23:51:41 -0000 1.1.2.8 +++ Ecore_X.h 3 Feb 2003 12:55:31 -0000 1.1.2.9 @@ -13,10 +13,52 @@ #ifdef __cplusplus extern "C" { #endif - + #ifndef _ECORE_X_PRIVATE_H #endif +typedef enum _Ecore_X_Event_Mode +{ + ECORE_X_EVENT_MODE_NORMAL, + ECORE_X_EVENT_MODE_WHILE_GRABBED, + ECORE_X_EVENT_MODE_GRAB, + ECORE_X_EVENT_MODE_UNGRAB +} Ecore_X_Event_Mode; + +typedef enum _Ecore_X_Event_Detail +{ + ECORE_X_EVENT_DETAIL_ANCESTOR, + ECORE_X_EVENT_DETAIL_VIRTUAL, + ECORE_X_EVENT_DETAIL_INFERIOR, + ECORE_X_EVENT_DETAIL_NON_LINEAR, + ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL, + ECORE_X_EVENT_DETAIL_POINTER, + ECORE_X_EVENT_DETAIL_POINTER_ROOT, + ECORE_X_EVENT_DETAIL_DETAIL_NONE +} Ecore_X_Event_Detail; + +typedef enum _Ecore_X_Event_Mask +{ + ECORE_X_EVEMT_MASK_KEY_DOWN = (1 << 0), + ECORE_X_EVEMT_MASK_KEY_UP = (1 << 1), + ECORE_X_EVEMT_MASK_MOUSE_DOWN = (1 << 2), + ECORE_X_EVEMT_MASK_MOUSE_UP = (1 << 3), + ECORE_X_EVEMT_MASK_MOUSE_IN = (1 << 4), + ECORE_X_EVEMT_MASK_MOUSE_OUT = (1 << 5), + ECORE_X_EVEMT_MASK_MOUSE_MOVE = (1 << 6), + ECORE_X_EVEMT_MASK_WINDOW_DAMAGE = (1 << 7), + ECORE_X_EVEMT_MASK_WINDOW_VISIBILITY = (1 << 8), + ECORE_X_EVEMT_MASK_WINDOW_CONFIGURE = (1 << 9), + ECORE_X_EVEMT_MASK_WINDOW_MANAGE = (1 << 10), + ECORE_X_EVEMT_MASK_WINDOW_RESIZE_MANAGE = (1 << 11), + ECORE_X_EVEMT_MASK_WINDOW_CHILD_CONFIGURE = (1 << 13), + ECORE_X_EVEMT_MASK_WINDOW_FOCUS_IN = (1 << 14), + ECORE_X_EVEMT_MASK_WINDOW_FOCUS_OUT = (1 << 15), + ECORE_X_EVEMT_MASK_WINDOW_PROPERTY = (1 << 16), + ECORE_X_EVEMT_MASK_WINDOW_COLORMAP = (1 << 17), + ECORE_X_EVEMT_MASK_WINDOW_GRAB = (1 << 18) +} Ecore_X_Event_Mask; + typedef struct _Ecore_X_Event_Key_Down Ecore_X_Event_Key_Down; typedef struct _Ecore_X_Event_Key_Up Ecore_X_Event_Key_Up; typedef struct _Ecore_X_Event_Mouse_Button_Down Ecore_X_Event_Mouse_Button_Down; @@ -46,6 +88,8 @@ typedef struct _Ecore_X_Event_Selection_Request Ecore_X_Event_Selection_Request; typedef struct _Ecore_X_Event_Window_Shape Ecore_X_Event_Window_Shape; +typedef struct _Ecore_X_Event_Window_Delete_Request +Ecore_X_Event_Window_Delete_Request; + struct _Ecore_X_Event_Key_Down { char *keyname; @@ -99,70 +143,47 @@ struct _Ecore_X_Event_Mouse_In { - int modifiers; - int x, y; - Window win; - Window subwin; - struct { - int grab : 1; - int ungrab : 1; - } mode; - struct { - int parent : 1; - int child : 1; - int virt : 1; - int non_linear : 1; - } notify; - Time time; + int modifiers; + int x, y; + Window win; + Window subwin; + Ecore_X_Event_Mode mode; + Ecore_X_Event_Detail detail; + Time time; }; struct _Ecore_X_Event_Mouse_Out { - int modifiers; - int x, y; - Window win; - Window subwin; - struct { - int grab : 1; - int ungrab : 1; - } mode; - struct { - int parent : 1; - int child : 1; - int virt : 1; - int non_linear : 1; - } notify; - Time time; + int modifiers; + int x, y; + Window win; + Window subwin; + Ecore_X_Event_Mode mode; + Ecore_X_Event_Detail detail; + Time time; }; struct _Ecore_X_Event_Window_Focus_In { - Window win; - struct { - int while_grabbed : 1; - int grab : 1; - int ungrab : 1; - } mode; - struct { - int parent : 1; - int child : 1; - int virt : 1; - int non_linear : 1; - int pointer : 1; - int root : 1; - } notify; - Time time; + Window win; + Ecore_X_Event_Mode mode; + Ecore_X_Event_Detail detail; + Time time; }; struct _Ecore_X_Event_Window_Focus_Out { - Window win; + Window win; + Ecore_X_Event_Mode mode; + Ecore_X_Event_Detail detail; + Time time; }; struct _Ecore_X_Event_Window_Damage { Window win; int x, y, w, h; + Time time; }; struct _Ecore_X_Event_Window_Visibility_Change @@ -178,6 +199,7 @@ struct _Ecore_X_Event_Window_Destroy { Window win; + Time time; }; struct _Ecore_X_Event_Window_Hide @@ -198,19 +220,21 @@ struct _Ecore_X_Event_Window_Reparent { Window win; - Window new_parent; }; struct _Ecore_X_Event_Window_Configure { Window win; + Window abovewin; int x, y, w, h; + int border; + int override : 1; + Time time; }; struct _Ecore_X_Event_Window_Configure_Request { Window win; - int x, y, w, h; }; struct _Ecore_X_Event_Window_Stack @@ -258,6 +282,12 @@ Window win; }; +struct _Ecore_X_Event_Window_Delete_Request +{ + Window win; + Time time; +}; + extern int ECORE_EVENT_X_KEY_DOWN; extern int ECORE_EVENT_X_KEY_UP; extern int ECORE_EVENT_X_MOUSE_BUTTON_DOWN; @@ -287,6 +317,8 @@ extern int ECORE_EVENT_X_SELECTION_REQUEST; extern int ECORE_EVENT_X_WINDOW_SHAPE; +extern int ECORE_EVENT_X_WINDOW_DELETE_REQUEST; + extern int ECORE_MODIFIER_SHIFT; extern int ECORE_MODIFIER_CTRL; extern int ECORE_MODIFIER_ALT; =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Attic/ecore_x.c,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -3 -r1.1.2.6 -r1.1.2.7 --- ecore_x.c 23 Jan 2003 23:03:24 -0000 1.1.2.6 +++ ecore_x.c 3 Feb 2003 12:55:31 -0000 1.1.2.7 @@ -13,6 +13,10 @@ Display *_ecore_x_disp = NULL; double _ecore_x_double_click_time = 0.25; +Time _ecore_x_event_last_time = 0; + +Atom _ecore_x_atom_wm_delete_window = 0; +Atom _ecore_x_atom_wm_protocols = 0; int ECORE_EVENT_X_KEY_DOWN = 0; int ECORE_EVENT_X_KEY_UP = 0; @@ -43,6 +47,8 @@ int ECORE_EVENT_X_SELECTION_REQUEST = 0; int ECORE_EVENT_X_WINDOW_SHAPE = 0; +int ECORE_EVENT_X_WINDOW_DELETE_REQUEST = 0; + int ECORE_MODIFIER_SHIFT = 0; int ECORE_MODIFIER_CTRL = 0; int ECORE_MODIFIER_ALT = 0; @@ -91,7 +97,9 @@ _ecore_x_event_handlers[LeaveNotify] = _ecore_x_event_handle_leave_notify; _ecore_x_event_handlers[FocusIn] = _ecore_x_event_handle_focus_in; _ecore_x_event_handlers[FocusOut] = _ecore_x_event_handle_focus_out; + _ecore_x_event_handlers[KeymapNotify] = _ecore_x_event_handle_keymap_notify; _ecore_x_event_handlers[Expose] = _ecore_x_event_handle_expose; + _ecore_x_event_handlers[GraphicsExpose] = _ecore_x_event_handle_graphics_expose; _ecore_x_event_handlers[VisibilityNotify] = _ecore_x_event_handle_visibility_notify; _ecore_x_event_handlers[CreateNotify] = _ecore_x_event_handle_create_notify; _ecore_x_event_handlers[DestroyNotify] = _ecore_x_event_handle_destroy_notify; @@ -101,14 +109,17 @@ _ecore_x_event_handlers[ReparentNotify] = _ecore_x_event_handle_reparent_notify; _ecore_x_event_handlers[ConfigureNotify] = _ecore_x_event_handle_configure_notify; _ecore_x_event_handlers[ConfigureRequest] = _ecore_x_event_handle_configure_request; + _ecore_x_event_handlers[GravityNotify] = _ecore_x_event_handle_gravity_notify; + _ecore_x_event_handlers[ResizeRequest] = _ecore_x_event_handle_resize_request; _ecore_x_event_handlers[CirculateNotify] = _ecore_x_event_handle_circulate_notify; _ecore_x_event_handlers[CirculateRequest] = _ecore_x_event_handle_circulate_request; _ecore_x_event_handlers[PropertyNotify] = _ecore_x_event_handle_property_notify; - _ecore_x_event_handlers[ColormapNotify] = _ecore_x_event_handle_colormap_notify; - _ecore_x_event_handlers[ClientMessage] = _ecore_x_event_handle_client_message; - _ecore_x_event_handlers[SelectionNotify] = _ecore_x_event_handle_selection_notify; _ecore_x_event_handlers[SelectionClear] = _ecore_x_event_handle_selection_clear; _ecore_x_event_handlers[SelectionRequest] = _ecore_x_event_handle_selection_request; + _ecore_x_event_handlers[SelectionNotify] = _ecore_x_event_handle_selection_notify; + _ecore_x_event_handlers[ColormapNotify] = _ecore_x_event_handle_colormap_notify; + _ecore_x_event_handlers[MappingNotify] = _ecore_x_event_handle_mapping_notify; + _ecore_x_event_handlers[ClientMessage] = _ecore_x_event_handle_client_message; if (_ecore_x_event_shape_id) _ecore_x_event_handlers[_ecore_x_event_shape_id] = _ecore_x_event_handle_shape_change; if (!ECORE_EVENT_X_KEY_DOWN) @@ -167,7 +178,9 @@ _ecore_x_disp = NULL; _ecore_x_event_handlers = NULL; return 0; - } + } + _ecore_x_atom_wm_delete_window = XInternAtom(_ecore_x_disp, "WM_DELETE_WINDOW", +False); + _ecore_x_atom_wm_protocols = XInternAtom(_ecore_x_disp, "WM_PROTOCOLS", False); return 1; } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Attic/ecore_x_events.c,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -3 -r1.1.2.5 -r1.1.2.6 --- ecore_x_events.c 23 Jan 2003 23:51:41 -0000 1.1.2.5 +++ ecore_x_events.c 3 Feb 2003 12:55:31 -0000 1.1.2.6 @@ -66,6 +66,7 @@ e->subwin = xevent->xkey.subwindow; e->time = xevent->xkey.time; e->modifiers = xevent->xkey.state; + _ecore_x_event_last_time = e->time; ecore_event_add(ECORE_EVENT_X_KEY_DOWN, e, _ecore_x_event_free_key_down, NULL); } @@ -101,6 +102,7 @@ e->subwin = xevent->xkey.subwindow; e->time = xevent->xkey.time; e->modifiers = xevent->xkey.state; + _ecore_x_event_last_time = e->time; ecore_event_add(ECORE_EVENT_X_KEY_UP, e, _ecore_x_event_free_key_up, NULL); } @@ -132,6 +134,7 @@ e->win = xevent->xbutton.window; e->subwin = xevent->xbutton.subwindow; e->time = xevent->xbutton.time; + _ecore_x_event_last_time = e->time; ecore_event_add(ECORE_EVENT_X_MOUSE_MOVE, e, _ecore_x_event_free_generic, NULL); } { @@ -159,6 +162,7 @@ did_triple = 1; e->triple_click = 1; } + _ecore_x_event_last_time = e->time; ecore_event_add(ECORE_EVENT_X_MOUSE_BUTTON_DOWN, e, _ecore_x_event_free_generic, NULL); } if (did_triple) @@ -199,6 +203,7 @@ e->win = xevent->xbutton.window; e->subwin = xevent->xbutton.subwindow; e->time = xevent->xbutton.time; + _ecore_x_event_last_time = e->time; ecore_event_add(ECORE_EVENT_X_MOUSE_MOVE, e, _ecore_x_event_free_generic, NULL); } { @@ -213,6 +218,7 @@ e->win = xevent->xbutton.window; e->subwin = xevent->xbutton.subwindow; e->time = xevent->xbutton.time; + _ecore_x_event_last_time = e->time; ecore_event_add(ECORE_EVENT_X_MOUSE_BUTTON_UP, e, _ecore_x_event_free_generic, NULL); } } @@ -231,6 +237,7 @@ e->win = xevent->xmotion.window; e->subwin = xevent->xmotion.subwindow; e->time = xevent->xmotion.time; + _ecore_x_event_last_time = e->time; ecore_event_add(ECORE_EVENT_X_MOUSE_MOVE, e, _ecore_x_event_free_generic, NULL); } @@ -248,6 +255,7 @@ e->win = xevent->xcrossing.window; e->subwin = xevent->xcrossing.subwindow; e->time = xevent->xcrossing.time; + _ecore_x_event_last_time = e->time; ecore_event_add(ECORE_EVENT_X_MOUSE_MOVE, e, _ecore_x_event_free_generic, NULL); } { @@ -260,30 +268,16 @@ e->y = xevent->xcrossing.y; e->win = xevent->xcrossing.window; e->subwin = xevent->xcrossing.subwindow; - if (xevent->xcrossing.mode == NotifyGrab) e->mode.grab = 1; - else if (xevent->xcrossing.mode == NotifyUngrab) e->mode.ungrab = 1; - if (xevent->xcrossing.detail == NotifyAncestor) - { - e->notify.parent = 1; - } - else if (xevent->xcrossing.detail == NotifyVirtual) - { - e->notify.virt = 1; - } - else if (xevent->xcrossing.detail == NotifyInferior) - { - e->notify.child = 1; - } - else if (xevent->xcrossing.detail == NotifyNonlinear) - { - e->notify.non_linear = 1; - } - else if (xevent->xcrossing.detail == NotifyNonlinearVirtual) - { - e->notify.virt = 1; - e->notify.non_linear = 1; - } + if (xevent->xcrossing.mode == NotifyNormal) e->mode = +ECORE_X_EVENT_MODE_NORMAL; + else if (xevent->xcrossing.mode == NotifyGrab) e->mode = +ECORE_X_EVENT_MODE_GRAB; + else if (xevent->xcrossing.mode == NotifyUngrab) e->mode = +ECORE_X_EVENT_MODE_UNGRAB; + if (xevent->xcrossing.detail == NotifyAncestor) e->detail = +ECORE_X_EVENT_DETAIL_ANCESTOR; + else if (xevent->xcrossing.detail == NotifyVirtual) e->detail = +ECORE_X_EVENT_DETAIL_VIRTUAL; + else if (xevent->xcrossing.detail == NotifyInferior) e->detail = +ECORE_X_EVENT_DETAIL_INFERIOR; + else if (xevent->xcrossing.detail == NotifyNonlinear) e->detail = +ECORE_X_EVENT_DETAIL_NON_LINEAR; + else if (xevent->xcrossing.detail == NotifyNonlinearVirtual) e->detail = +ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL; e->time = xevent->xcrossing.time; + _ecore_x_event_last_time = e->time; ecore_event_add(ECORE_EVENT_X_MOUSE_IN, e, _ecore_x_event_free_generic, NULL); } } @@ -302,6 +296,7 @@ e->win = xevent->xcrossing.window; e->subwin = xevent->xcrossing.subwindow; e->time = xevent->xcrossing.time; + _ecore_x_event_last_time = e->time; ecore_event_add(ECORE_EVENT_X_MOUSE_MOVE, e, _ecore_x_event_free_generic, NULL); } { @@ -314,29 +309,14 @@ e->y = xevent->xcrossing.y; e->win = xevent->xcrossing.window; e->subwin = xevent->xcrossing.subwindow; - if (xevent->xcrossing.mode == NotifyGrab) e->mode.grab = 1; - else if (xevent->xcrossing.mode == NotifyUngrab) e->mode.ungrab = 1; - if (xevent->xcrossing.detail == NotifyAncestor) - { - e->notify.parent = 1; - } - else if (xevent->xcrossing.detail == NotifyVirtual) - { - e->notify.virt = 1; - } - else if (xevent->xcrossing.detail == NotifyInferior) - { - e->notify.child = 1; - } - else if (xevent->xcrossing.detail == NotifyNonlinear) - { - e->notify.non_linear = 1; - } - else if (xevent->xcrossing.detail == NotifyNonlinearVirtual) - { - e->notify.virt = 1; - e->notify.non_linear = 1; - } + if (xevent->xcrossing.mode == NotifyNormal) e->mode = +ECORE_X_EVENT_MODE_NORMAL; + else if (xevent->xcrossing.mode == NotifyGrab) e->mode = +ECORE_X_EVENT_MODE_GRAB; + else if (xevent->xcrossing.mode == NotifyUngrab) e->mode = +ECORE_X_EVENT_MODE_UNGRAB; + if (xevent->xcrossing.detail == NotifyAncestor) e->detail = +ECORE_X_EVENT_DETAIL_ANCESTOR; + else if (xevent->xcrossing.detail == NotifyVirtual) e->detail = +ECORE_X_EVENT_DETAIL_VIRTUAL; + else if (xevent->xcrossing.detail == NotifyInferior) e->detail = +ECORE_X_EVENT_DETAIL_INFERIOR; + else if (xevent->xcrossing.detail == NotifyNonlinear) e->detail = +ECORE_X_EVENT_DETAIL_NON_LINEAR; + else if (xevent->xcrossing.detail == NotifyNonlinearVirtual) e->detail = +ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL; e->time = xevent->xcrossing.time; ecore_event_add(ECORE_EVENT_X_MOUSE_OUT, e, _ecore_x_event_free_generic, NULL); } @@ -345,104 +325,250 @@ void _ecore_x_event_handle_focus_in(XEvent *xevent) { + Ecore_X_Event_Window_Focus_In *e; + + e = calloc(1, sizeof(Ecore_X_Event_Window_Focus_In)); + if (!e) return; + e->win = xevent->xfocus.window; + if (xevent->xfocus.mode == NotifyNormal) e->mode = +ECORE_X_EVENT_MODE_NORMAL; + else if (xevent->xfocus.mode == NotifyWhileGrabbed) e->mode = +ECORE_X_EVENT_MODE_WHILE_GRABBED; + else if (xevent->xfocus.mode == NotifyGrab) e->mode = +ECORE_X_EVENT_MODE_GRAB; + else if (xevent->xfocus.mode == NotifyUngrab) e->mode = +ECORE_X_EVENT_MODE_UNGRAB; + if (xevent->xfocus.detail == NotifyAncestor) e->detail = +ECORE_X_EVENT_DETAIL_ANCESTOR; + else if (xevent->xfocus.detail == NotifyVirtual) e->detail = +ECORE_X_EVENT_DETAIL_VIRTUAL; + else if (xevent->xfocus.detail == NotifyInferior) e->detail = +ECORE_X_EVENT_DETAIL_INFERIOR; + else if (xevent->xfocus.detail == NotifyNonlinear) e->detail = +ECORE_X_EVENT_DETAIL_NON_LINEAR; + else if (xevent->xfocus.detail == NotifyNonlinearVirtual) e->detail = +ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL; + else if (xevent->xfocus.detail == NotifyPointer) e->detail = +ECORE_X_EVENT_DETAIL_POINTER; + else if (xevent->xfocus.detail == NotifyPointerRoot) e->detail = +ECORE_X_EVENT_DETAIL_POINTER_ROOT; + else if (xevent->xfocus.detail == NotifyDetailNone) e->detail = +ECORE_X_EVENT_DETAIL_DETAIL_NONE; + e->time = _ecore_x_event_last_time; + ecore_event_add(ECORE_EVENT_X_WINDOW_FOCUS_IN, e, _ecore_x_event_free_generic, +NULL); } void _ecore_x_event_handle_focus_out(XEvent *xevent) { + Ecore_X_Event_Window_Focus_Out *e; + + e = calloc(1, sizeof(Ecore_X_Event_Window_Focus_Out)); + if (!e) return; + e->win = xevent->xfocus.window; + if (xevent->xfocus.mode == NotifyNormal) e->mode = +ECORE_X_EVENT_MODE_NORMAL; + else if (xevent->xfocus.mode == NotifyWhileGrabbed) e->mode = +ECORE_X_EVENT_MODE_WHILE_GRABBED; + else if (xevent->xfocus.mode == NotifyGrab) e->mode = +ECORE_X_EVENT_MODE_GRAB; + else if (xevent->xfocus.mode == NotifyUngrab) e->mode = +ECORE_X_EVENT_MODE_UNGRAB; + if (xevent->xfocus.detail == NotifyAncestor) e->detail = +ECORE_X_EVENT_DETAIL_ANCESTOR; + else if (xevent->xfocus.detail == NotifyVirtual) e->detail = +ECORE_X_EVENT_DETAIL_VIRTUAL; + else if (xevent->xfocus.detail == NotifyInferior) e->detail = +ECORE_X_EVENT_DETAIL_INFERIOR; + else if (xevent->xfocus.detail == NotifyNonlinear) e->detail = +ECORE_X_EVENT_DETAIL_NON_LINEAR; + else if (xevent->xfocus.detail == NotifyNonlinearVirtual) e->detail = +ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL; + else if (xevent->xfocus.detail == NotifyPointer) e->detail = +ECORE_X_EVENT_DETAIL_POINTER; + else if (xevent->xfocus.detail == NotifyPointerRoot) e->detail = +ECORE_X_EVENT_DETAIL_POINTER_ROOT; + else if (xevent->xfocus.detail == NotifyDetailNone) e->detail = +ECORE_X_EVENT_DETAIL_DETAIL_NONE; + e->time = _ecore_x_event_last_time; + ecore_event_add(ECORE_EVENT_X_WINDOW_FOCUS_OUT, e, _ecore_x_event_free_generic, +NULL); +} + +void +_ecore_x_event_handle_keymap_notify(XEvent *xevent) +{ + /* FIXME: handle this event type */ } void _ecore_x_event_handle_expose(XEvent *xevent) { + Ecore_X_Event_Window_Damage *e; + + e = calloc(1, sizeof(Ecore_X_Event_Window_Damage)); + if (!e) return; + e->win = xevent->xexpose.window; + e->time = _ecore_x_event_last_time; + e->x = xevent->xexpose.x; + e->y = xevent->xexpose.y; + e->w = xevent->xexpose.width; + e->h = xevent->xexpose.height; + e->time = _ecore_x_event_last_time; + ecore_event_add(ECORE_EVENT_X_WINDOW_DAMAGE, e, _ecore_x_event_free_generic, +NULL); +} + +void +_ecore_x_event_handle_graphics_expose(XEvent *xevent) +{ + Ecore_X_Event_Window_Damage *e; + + e = calloc(1, sizeof(Ecore_X_Event_Window_Damage)); + if (!e) return; + e->win = xevent->xgraphicsexpose.drawable; + e->time = _ecore_x_event_last_time; + e->x = xevent->xgraphicsexpose.x; + e->y = xevent->xgraphicsexpose.y; + e->w = xevent->xgraphicsexpose.width; + e->h = xevent->xgraphicsexpose.height; + e->time = _ecore_x_event_last_time; + ecore_event_add(ECORE_EVENT_X_WINDOW_DAMAGE, e, _ecore_x_event_free_generic, +NULL); } void _ecore_x_event_handle_visibility_notify(XEvent *xevent) { + /* FIXME: handle this event type */ } void _ecore_x_event_handle_create_notify(XEvent *xevent) { + /* FIXME: handle this event type */ } void _ecore_x_event_handle_destroy_notify(XEvent *xevent) { + Ecore_X_Event_Window_Destroy *e; + + e = calloc(1, sizeof(Ecore_X_Event_Window_Destroy)); + if (!e) return; + e->win = xevent->xdestroywindow.window; + e->time = _ecore_x_event_last_time; + ecore_event_add(ECORE_EVENT_X_WINDOW_DESTROY, e, _ecore_x_event_free_generic, +NULL); } void _ecore_x_event_handle_unmap_notify(XEvent *xevent) { + /* FIXME: handle this event type */ } void _ecore_x_event_handle_map_notify(XEvent *xevent) { + /* FIXME: handle this event type */ } void _ecore_x_event_handle_map_request(XEvent *xevent) { + /* FIXME: handle this event type */ } void _ecore_x_event_handle_reparent_notify(XEvent *xevent) { + /* FIXME: handle this event type */ } void _ecore_x_event_handle_configure_notify(XEvent *xevent) { + Ecore_X_Event_Window_Configure *e; + + e = calloc(1, sizeof(Ecore_X_Event_Window_Configure)); + if (!e) return; + e->win = xevent->xconfigure.window; + e->abovewin = xevent->xconfigure.above; + e->x = xevent->xconfigure.x; + e->y = xevent->xconfigure.y; + e->w = xevent->xconfigure.width; + e->h = xevent->xconfigure.height; + e->border = xevent->xconfigure.border_width; + e->override = xevent->xconfigure.override_redirect; + e->time = _ecore_x_event_last_time; + ecore_event_add(ECORE_EVENT_X_WINDOW_CONFIGURE, e, _ecore_x_event_free_generic, +NULL); } void _ecore_x_event_handle_configure_request(XEvent *xevent) { + /* FIXME: handle this event type */ +} + +void +_ecore_x_event_handle_gravity_notify(XEvent *xevent) +{ + /* FIXME: handle this event type */ +} + +void +_ecore_x_event_handle_resize_request(XEvent *xevent) +{ + /* FIXME: handle this event type */ } void _ecore_x_event_handle_circulate_notify(XEvent *xevent) { + /* FIXME: handle this event type */ } void _ecore_x_event_handle_circulate_request(XEvent *xevent) { + /* FIXME: handle this event type */ } void _ecore_x_event_handle_property_notify(XEvent *xevent) { + /* FIXME: handle this event type */ } void -_ecore_x_event_handle_colormap_notify(XEvent *xevent) +_ecore_x_event_handle_selection_clear(XEvent *xevent) { + /* FIXME: handle this event type */ } void -_ecore_x_event_handle_client_message(XEvent *xevent) +_ecore_x_event_handle_selection_request(XEvent *xevent) { + /* FIXME: handle this event type */ } void _ecore_x_event_handle_selection_notify(XEvent *xevent) { + /* FIXME: handle this event type */ } void -_ecore_x_event_handle_selection_clear(XEvent *xevent) +_ecore_x_event_handle_colormap_notify(XEvent *xevent) { + /* FIXME: handle this event type */ } void -_ecore_x_event_handle_selection_request(XEvent *xevent) +_ecore_x_event_handle_client_message(XEvent *xevent) +{ + /* Special client message event handling here. need to put LOTS of if */ + /* checks here and generate synthetic events per special message known */ + /* otherwise generate generic client message event */ + if ((xevent->xclient.message_type == _ecore_x_atom_wm_protocols) && + (xevent->xclient.format == 32) && + (xevent->xclient.data.l[0] == (long)_ecore_x_atom_wm_delete_window)) + { + Ecore_X_Event_Window_Delete_Request *e; + + e = calloc(1, sizeof(Ecore_X_Event_Window_Delete_Request)); + if (!e) return; + e->win = xevent->xclient.window; + e->time = _ecore_x_event_last_time; + ecore_event_add(ECORE_EVENT_X_WINDOW_DELETE_REQUEST, e, +_ecore_x_event_free_generic, NULL); + } + else + { + /* FIXME: handle this event type */ + } +} + +void +_ecore_x_event_handle_mapping_notify(XEvent *xevent) { + /* FIXME: handle this event type */ } void _ecore_x_event_handle_shape_change(XEvent *xevent) { + /* FIXME: handle this event type */ } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Attic/ecore_x_private.h,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -3 -r1.1.2.3 -r1.1.2.4 --- ecore_x_private.h 23 Jan 2003 11:12:18 -0000 1.1.2.3 +++ ecore_x_private.h 3 Feb 2003 12:55:31 -0000 1.1.2.4 @@ -12,6 +12,10 @@ extern Display *_ecore_x_disp; extern double _ecore_x_double_click_time; +extern Time _ecore_x_event_last_time; + +extern Atom _ecore_x_atom_wm_delete_window; +extern Atom _ecore_x_atom_wm_protocols; void _ecore_x_error_handler_init(void); void _ecore_x_event_handle_key_press(XEvent *xevent); @@ -23,7 +27,9 @@ void _ecore_x_event_handle_leave_notify(XEvent *xevent); void _ecore_x_event_handle_focus_in(XEvent *xevent); void _ecore_x_event_handle_focus_out(XEvent *xevent); +void _ecore_x_event_handle_keymap_notify(XEvent *xevent); void _ecore_x_event_handle_expose(XEvent *xevent); +void _ecore_x_event_handle_graphics_expose(XEvent *xevent); void _ecore_x_event_handle_visibility_notify(XEvent *xevent); void _ecore_x_event_handle_create_notify(XEvent *xevent); void _ecore_x_event_handle_destroy_notify(XEvent *xevent); @@ -33,14 +39,17 @@ void _ecore_x_event_handle_reparent_notify(XEvent *xevent); void _ecore_x_event_handle_configure_notify(XEvent *xevent); void _ecore_x_event_handle_configure_request(XEvent *xevent); +void _ecore_x_event_handle_gravity_notify(XEvent *xevent); +void _ecore_x_event_handle_resize_request(XEvent *xevent); void _ecore_x_event_handle_circulate_notify(XEvent *xevent); void _ecore_x_event_handle_circulate_request(XEvent *xevent); void _ecore_x_event_handle_property_notify(XEvent *xevent); -void _ecore_x_event_handle_colormap_notify(XEvent *xevent); -void _ecore_x_event_handle_client_message(XEvent *xevent); -void _ecore_x_event_handle_selection_notify(XEvent *xevent); void _ecore_x_event_handle_selection_clear(XEvent *xevent); void _ecore_x_event_handle_selection_request(XEvent *xevent); +void _ecore_x_event_handle_selection_notify(XEvent *xevent); +void _ecore_x_event_handle_colormap_notify(XEvent *xevent); +void _ecore_x_event_handle_client_message(XEvent *xevent); +void _ecore_x_event_handle_mapping_notify(XEvent *xevent); void _ecore_x_event_handle_shape_change(XEvent *xevent); #endif ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs