DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T X

⟦296e455a2⟧ TextFile

    Length: 1179 (0x49b)
    Types: TextFile
    Names: »XChkWinEvent.c«

Derivation

└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
    └─ ⟦526ad3590⟧ »EUUGD11/gnu-31mar87/X.V10.R4.tar.Z« 
        └─⟦2109abc41⟧ 
            └─ ⟦this⟧ »./X.V10R4/Xlib/XChkWinEvent.c« 

TextFile

#include <X/mit-copyright.h>

/* $Header: XChkWinEvent.c,v 10.1 86/03/28 11:28:48 jg Rel $ */
/* Copyright    Massachusetts Institute of Technology    1985	*/

#include "XlibInternal.h"

extern _QEvent *_qfree;

/* 
 * Flush output and return the next event in the queue
 * for the given window matching one of the events in the mask if there
 * is one.  Return whether such an event was found.
 * Events earlier in the queue are not discarded.
 */

int XCheckWindowEvent (w, mask, event)
	Window w;		/* Selected window. */
	int mask;		/* Selected event mask. */
	register XEvent *event;	/* XEvent to be filled in. */
{
	register Display *dpy;
	register _QEvent *prev, *qelt;

	dpy = _XlibCurrentDisplay;
	_XFlush (dpy);
	for (prev = NULL, qelt = dpy->head;
	     qelt && (qelt->event.window != w ||
		      !(qelt->event.type & mask));
	     qelt = (prev = qelt)->next) ;
	if (qelt) {
	    *event = qelt->event;
	    if (prev) {
		if ((prev->next = qelt->next) == NULL)
		    dpy->tail = prev;
	    } else {
		if ((dpy->head = qelt->next) == NULL)
		    dpy->tail = NULL;
	    }
	    qelt->next = _qfree;
	    _qfree = qelt;
	    dpy->qlen--;
	    return 1;
	} else return 0;
}