December 6 2006

 * Nested event handling: In the process of handling an event, it may be necessary to
obtain further information from the user.  Usually, such information is obtained via a modal
dialog; in whatever fashion the input is obtained, more user events must be received and handled
before the original event is completely handled.  To allow the further processing of events,
the handler for the original event must explicitly yield to the system.  Yielding causes events
to be handled in a nested manner, rather than in a purely sequential manner.

 * Asynchronous event handling: An application may consist of windows that represent
independent dialogs with the user.  For example, a drawing program might support multiple drawing
windows, and a particularly time-consuming task in one window(e.g.,a special filter effect on an
image) should not prevent the user from working in a different window.  Such an application needs
sequential event handling for each individual window, but asynchronous (potentiallyparallel) event
handling across windows.  In other words, the application needs a separate event queue for each
window, and a separate event-handling thread for each event queue.

  In MrEd,an eventspace is a context for processing GUI events.  Each eventspace maintains its
own queue of events, and events in a single eventspace are dispatched sequentially by a designated
handler thread.  An event-handling procedure running in this handler thread can yield to the system
by calling "yield", in which case other event-handling procedures may be called in a nested(but
single-threaded) manner within the same handler thread.  Events from different eventspaces are
dispatched asynchronously by separate handler threads. 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值