Hi Lex,
Excellent!!!!!!! This is cool. I looked over the source and it looks great.
It would be useful to include a time stamp with each event, if possible. Usually the OS includes a "time that the event occured" field in its event stream. This is important for calculating things like double, tripple (NeXTStep used this to select a whole line of text for example), and quadripple (NeXTStep used this to select a whole paragraph of text for example) mouse clicks and for determining the time between events. Many user interface components can make use of the events times. If the time is missing then lots of things can't be done. The time should be the time the OS recorded the event not the time that the Squeak VM pulled it off of the event queue.
Also, some OSs provide extra information such as if it was a double click (by the users preference settings in the OS), a repeat key event, and modifier keys (I think you have this). Each keyboard event should also report the mouse position and button status (I think that you do this). Also, some OSs may have more information than others.
Another important piece of information associated with the event is which Window it is part of. This allows the user to click on another window thereby activating it and now the events get "consumed" by that window.
It would be cool if the use or squeak applications could control the size of the event queue. I guess this can be done from Smalltalk code.
With OS-level events it's possible to produce a "event recorder" to "playback event sequences" for automated GUI help systems (shows a quick sequence on how to do something), demos, and testing of applications.
An excellent reference implementation of Event Queues is NeXTStep and OpenStep (now MaxOSX). (This rather long url points to the MacOSX NSEvent class documentation. You may have to remove the line breaks and paste this into your web browsers address field manually). http://developer.apple.com/techpubs/macosxserver/System/Library/Frameworks/A ppKit.framework/Versions/C/Resources/English.lproj/Documentation/Reference/O bjC_classic/Classes/NSEvent.html
Will this important change make it into the Mac and Windows versions for the release of the next VM?
Awesome Lex. Thanks.
All the best,
Peter William Lount peter@smalltalk.org http://www.smalltalk.org
squeak-dev@lists.squeakfoundation.org