sqInt ioProcessEvents(void)

Parms: NONE
return: NONE, fake return of zero
From: Interpreter
Process operating system UI events and do housekeeping

Historically this was called by ioPeekKeystroke, ioGetKeystroke, ioMousePoint, ioGetButtonState, an ioGetNextEvent to process UI events in the pure polling pre event driven VM of the 90's. It is also called by the checkForInterrupt logic every 200ms or so.
On some platforms this routine is used to exit() the VM based on a quit now flag.

Morphic invokes ioGetNextEvent every 1/60 of a second so we use this logic to call aioPoll to service Socket states and also to service pending screen flushes. We also check the quit now flag and may exit()

See iPhone, but subclassed to also invoke NSApp sendEvent: after running the run loop.

Clone of macintosh, but includes logic to run the runloop

Note in summer of 2010 we changed the VM logic so that you could choose between running the VM as a sub process or off the main run loop. The problem with running as a sub process is that UIKit and Cocoa NSView interaction plus much of any Objective-C bridge work requires you to run on the main Thread. Although you can queue requests to run on the main thread, this fails with deadlock issues when you add UIKit or Cocoa Delegate callbacks to Squeak Proxy objects. So now the VM runs off the Main Thread and uses the runLoop call to service pending UI events.

Calls XNextEvent, and aioPoll

Some flavours of windows require checking for WM_PAINT, deal with squeak being a plugin window, confirm if browser is still alive (if plugin)

How often this is called is debatable...
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki