[Pharo-project] [squeak-dev] Re: Rewriting an Input/EventSensor code

Igor Stasenko siguctua at gmail.com
Sun Mar 22 18:42:00 UTC 2009


2009/3/22 K. K. Subramaniam <subbukk at gmail.com>:
> On Saturday 21 Mar 2009 9:51:10 pm Igor Stasenko wrote:
>> This is the role of EventSource class - represent VM as event source,
>> which producing an instances of KernelXXXEvent classes, and hiding the
>> details of converting raw event buffers from the eyes of higher
>> layers, which then going to handle the event (EventSensor/Morphic etc)

> A plain translation of events is not sufficient. The traditional keyboard
> (ASCII + modifiers) event type breaks down for the handhelds and newer
> devices (e.g. Nokia N810 does not have an ALT key!). It does not accomodate
> gestures (e.g. tilting or rocking). Squeak VM needs a flexible filter layer
> to translate such gestures to characters (e.g. Chinese or Indic) and
> commands. Plugins, perhaps?
>
as soon as someone come up with implementation for new input devices,
new events can be added easily.
Concerning accomodation, i don't agree.
At most low level, any device provides very simple signals to
operating system. It's the system's responsibility to interpret them
into something more complex.
For instance - look at mouse: OS receives only axis relative movement
and button states. It is OS then translating movement and adding a
mouse cursor position on top of it, while mouse doesn't needs to know
nothing about screen or cursor :)
Same for gestures - you can emit a very simple/basic events, and then
combine them to make something more complex/different.

> Subbu
>


-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list