[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: listening for input with CLX

Your message:


    does someone know how to perform the equivalent of a listen on the
    file descriptor associated with the input stream for a given display?

    i noticed that the r4 CLX code has support for this, but i can find neither
    neither the equivalent R3 CLX functions, nor the base functions which the R
    code used.

    the salient function appears to be:

    (defun fd-char-avail-p (fd)
      (multiple-value-bind (available-p errcode)
          (comp::.primcall-sargs 'sys::filesys excl::fs-char-avail fd)
        (if* errcode
           then t
           else available-p)))

    i am using allegro cl: "3.1.beta.28 [DEC 3100] (8/3;8/7/89)"

    james anderson.


If you are using R4 CLX (which I recommend), just use:
	(xlib::buffer-listen display)

If you need a blocking listen, use xlib::buffer-input-wait with a nil timeout.

	-- John Irwin