/* Blocking calls*/ int XWindowEvent(Display * display, Window w, long event_mask, XEvent * ev) { GR_BOOL block = GR_TRUE; GR_EVENT event; FUNC_ENTER; /* * FIXME: FLTK is coded assuming at least a NoExpose event will * be returned after an XCopyArea. Since Microwindows doesn't * do this, we check for ExposureMask, don't block, and return * NoExpose in order to get FLTK to work. (fltk/test/scroll demo) */ if (event_mask == ExposureMask) block = GR_FALSE; if (GrGetTypedEvent(w, _nxTranslateEventMask(event_mask), 0, &event, block)) { translateNXEvent(display, &event, ev); FUNC_EXIT; return ev->type; } FUNC_EXIT; /* FLTK hack*/ if (event_mask == ExposureMask) ev->type = NoExpose; return 0; }
int XSelectInput(Display * dpy, Window w, long mask) { GR_EVENT_MASK nxmask; nxmask = _nxTranslateEventMask(mask); GrSelectEvents(w, nxmask); return 1; }
Bool XCheckMaskEvent(Display * display, long event_mask, XEvent * ev) { GR_EVENT event; FUNC_ENTER; if (GrGetTypedEvent(0, _nxTranslateEventMask(event_mask), 0, &event, GR_FALSE)) { translateNXEvent(display, &event, ev); FUNC_EXIT; return True; } FUNC_EXIT; return False; }
int XMaskEvent(Display * display, long event_mask, XEvent * ev) { GR_EVENT event; FUNC_ENTER; if (GrGetTypedEvent(0, _nxTranslateEventMask(event_mask), 0, &event, GR_TRUE)) { translateNXEvent(display, &event, ev); FUNC_EXIT; return ev->type; } FUNC_EXIT; return 0; }