A string or
A function designator.
A generalized boolean.
mailbox-wait-for-event waits for an event in a mailbox in a "windowing friendly" way. It reads an event from the mailbox mailbox. If there is no event in the mailbox, it waits for an event (unless no-hang-p is true).
mailbox-wait-for-event is the appropriate way to wait for an event in a mailbox in an application with a graphical user interface, because it interacts correctly with the windowing system. Most importantly, on Microsoft Windows, when process-other-messages-p is true it processes Windows messages while it is waiting. The default value of process-other-messages-p is
If wait-function is non-nil, then is it called as a Process Wait function (see Generic Process Wait functions) with the mailbox mailbox as its argument while waiting for an event. If the call returns true before any events arrive, then
mailbox-wait-for-event will return
no-hang-p controls whether
mailbox-wait-for-event should really wait. If no-hang-p is true and there is no event, it returns immediately except on Microsoft Windows, where it may first process all Windows messages (depending on the value of process-other-messages-p). The default value of no-hang-p is
stop-at-user-operation-p on Microsoft Windows causes
mailbox-wait-for-event to return if it received a user operation message (meaning keyboard or mouse input). It has no effect on other platforms. The default value of stop-at-user-operation-p is
LispWorks User Guide and Reference Manual - 13 Feb 2015