예제 #1
0
/* 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;
}
예제 #2
0
파일: SelInput.c 프로젝트: wlsloi/nxlib
int
XSelectInput(Display * dpy, Window w, long mask)
{
    GR_EVENT_MASK nxmask;

    nxmask = _nxTranslateEventMask(mask);
    GrSelectEvents(w, nxmask);
    return 1;
}
예제 #3
0
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;
}
예제 #4
0
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;
}