All Manuals > Common Lisp Interface Manager 2.0 User's Guide > Chapter 18 Sheets > 18.5 Sheet Protocols: Input

NextPrevUpTopContentsIndex

18.5.1 Input Protocol Functions

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

port-keyboard-input-focus [Generic Function]

Arguments: port

(setf port-keyboard-input-focus) [Generic Function]

Arguments: focus port

Summary: Returns the client to which keyboard events are to be dispatched.

distribute-event [Generic Function]

Arguments: port event

Summary: 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.

dispatch-event [Generic Function]

Arguments: client event

Summary: This function is called to inform a client about an event of interest. It is invoked synchronously by whatever process called process-next-event , so many methods for this function will simply queue the event for later handling. Certain classes of clients and events may cause this function to call either queue-event or handle-event immediately, or else to ignore the event entirely.

queue-event [Generic Function]

Arguments: client event

Summary: Places the event event into the queue of events for the client client .

handle-event [Generic Function]

Arguments: client event

Summary: Implements the client's policy with respect to the event. For example, if the programmer wishes to highlight a sheet in response to an event that informs it that the pointer has entered its territory, there would be a method to carry out the policy that specializes the appropriate sheet and event classes.

In addition to queue-event , the queued input protocol handles the following generic functions:

event-read [Generic Function]

Arguments: client

Summary: Takes the next event out of the queue of events for this client.

event-read-no-hang [Generic Function]

Arguments: client

Summary: Takes the next event out of the queue of events for this client. It returns nil if there are no events in the queue.

event-peek [Generic Function]

Arguments: client &optional event-type

Summary: Returns the next event in the queue without removing it from the queue. If event-type is supplied, events that are not of that type are first removed and discarded.

event-unread [Generic Function]

Arguments: client event

Summary: Places the event at the head of the client 's event queue, to be the event read next.

event-listen [Generic Function]

Arguments: client

Summary: Returns t if there are any events queued for client ; otherwise, it returns nil .


Common Lisp Interface Manager 2.0 User's Guide - 3 Mar 2015

NextPrevUpTopContentsIndex