Page 54 Table of Contents Index Page 56
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E



CHAPTER 8. SHEET PROTOCOLS

accessor port-keyboard-input-focus contains the event client that receives the port's keyboard
events.

8.1.1 Input Protocol Functions

In the functions below, the client argument is typically a sheet, but it may be another object
that supports event distribution, dispatching, and handling.

Minor issue: Do we want to advertise sheet-event-queue? It is analogous to the input
buffer for a stream. (In fact, sometimes the stream's input buffer and the event queue for the
shet are the exact same object.) | SWM

=> process-next-event port &key wait-function timeout [Generic Function]
This function provides a standard interface for one pass through a port's event processing loop.
wait-function is either nil or a function of no arguments that acts as a predicate; it has dynamic
extent. The predicate should wait until one of three conditions occurs:
If an event if received and processed, the predicate should return true.

If a timeout occurs, the predicate should return false.

If the wait function returns true, the predicate should return the two values false and
:timeout.
A port implementation must provide a method for this function that reads the next window
server-specific device event, blocking if necessary, and then invokes the event distributor.

=> port-keyboard-input-focus port [Generic Function]
=> (setf port-keyboard-input-focus) focus port [Generic Function]
Returns the client to which keyboard events are to be dispatched.

Minor issue: Should this accessor be called keyboard-input-focus? It may be that we want
to be able to call it on a frame in order to implement some sort of per-frame input focus. | RSL

=> distribute-event port event [Generic Function]
The event is distributed to the port's proper client. In general, this will be the keyboard input
focus for keyboard events, and the lowest sheet under the pointer for pointer events.

Minor issue: Do we just want to call this function dispatch-event and have it called on the
port first? | RSL

=> dispatch-event client event [Generic Function]
This function is called by process-next-event to inform a client about an event of interest.
It is invoked synchronously by whatever process called process-next-event, so many methods


Page 54 Table of Contents Index Page 56
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E