Changeset 6424 for trunk/Ohana/src/kapa/event/EventLoop.c
- Timestamp:
- Feb 13, 2006, 9:27:46 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/kapa/event/EventLoop.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/kapa/event/EventLoop.c
r5612 r6424 1 1 # include "Ximage.h" 2 2 3 # define IgnoreMask (long) (ButtonPressMask | ClientMessage | ButtonReleaseMask | KeyPressMask | PointerMotionMask) 3 /* # define IgnoreMask (long) (ButtonPressMask | ClientMessage | ButtonReleaseMask | KeyPressMask | PointerMotionMask) */ 4 5 /* list events being selected below, all other masks are ignored */ 6 # define IgnoreMask (long) (~(StructureNotifyMask | SubstructureNotifyMask | ExposureMask)) 4 7 5 8 int LastEvent (Display *display, int type, XEvent *event) { … … 33 36 34 37 if (XEventsQueued (graphic.display, QueuedAfterFlush) < 1) { 38 /* fprintf (stderr, "."); */ 35 39 usleep (50000); 36 40 continue; … … 54 58 /* remove those events we will ignore */ 55 59 while (XCheckMaskEvent (display, IgnoreMask, &event)) continue; 56 60 61 /* events to remove which have no mask component */ 62 while (XCheckTypedEvent (display, MappingNotify, &event)) continue; 63 while (XCheckTypedEvent (display, ClientMessage, &event)) continue; 64 while (XCheckTypedEvent (display, SelectionClear, &event)) continue; 65 while (XCheckTypedEvent (display, SelectionNotify, &event)) continue; 66 while (XCheckTypedEvent (display, SelectionRequest, &event)) continue; 57 67 } 58 68 return (status); 59 69 } 70 71 # if (0) 72 73 /* all masks from X.h for reference: */ 74 75 #define NoEventMask 0L 76 #define KeyPressMask (1L<<0) 77 #define KeyReleaseMask (1L<<1) 78 #define ButtonPressMask (1L<<2) 79 #define ButtonReleaseMask (1L<<3) 80 #define EnterWindowMask (1L<<4) 81 #define LeaveWindowMask (1L<<5) 82 #define PointerMotionMask (1L<<6) 83 #define PointerMotionHintMask (1L<<7) 84 #define Button1MotionMask (1L<<8) 85 #define Button2MotionMask (1L<<9) 86 #define Button3MotionMask (1L<<10) 87 #define Button4MotionMask (1L<<11) 88 #define Button5MotionMask (1L<<12) 89 #define ButtonMotionMask (1L<<13) 90 #define KeymapStateMask (1L<<14) 91 #define ExposureMask (1L<<15) 92 #define VisibilityChangeMask (1L<<16) 93 #define StructureNotifyMask (1L<<17) 94 #define ResizeRedirectMask (1L<<18) 95 #define SubstructureNotifyMask (1L<<19) 96 #define SubstructureRedirectMask (1L<<20) 97 #define FocusChangeMask (1L<<21) 98 #define PropertyChangeMask (1L<<22) 99 #define ColormapChangeMask (1L<<23) 100 #define OwnerGrabButtonMask (1L<<24) 101 102 /* all events from X.h for reference: */ 103 104 #define KeyPress 2 105 #define KeyRelease 3 106 #define ButtonPress 4 107 #define ButtonRelease 5 108 #define MotionNotify 6 109 #define EnterNotify 7 110 #define LeaveNotify 8 111 #define FocusIn 9 112 #define FocusOut 10 113 #define KeymapNotify 11 114 #define Expose 12 115 #define GraphicsExpose 13 116 #define NoExpose 14 117 #define VisibilityNotify 15 118 #define CreateNotify 16 119 #define DestroyNotify 17 120 #define UnmapNotify 18 121 #define MapNotify 19 122 #define MapRequest 20 123 #define ReparentNotify 21 124 #define ConfigureNotify 22 125 #define ConfigureRequest 23 126 #define GravityNotify 24 127 #define ResizeRequest 25 128 #define CirculateNotify 26 129 #define CirculateRequest 27 130 #define PropertyNotify 28 131 #define SelectionClear 29 132 #define SelectionRequest 30 133 #define SelectionNotify 31 134 #define ColormapNotify 32 135 #define ClientMessage 33 136 #define MappingNotify 34 137 #define LASTEvent 35 /* must be bigger than any event # */ 138 139 # endif
Note:
See TracChangeset
for help on using the changeset viewer.
