[Pharo-project] The event handling mechanism implemented in Gaucho

Fernando Olivero fernando.olivero at usi.ch
Tue Mar 6 06:37:26 EST 2012


Here is the code, the categories which include the mentioned classes.

I'm preparing a one-click image of Gaucho for the Mac, so you can play
with it also.
And as the official release of the tool also!



On Tue, Mar 6, 2012 at 12:33 PM, fernando.olivero at usi.ch
<fernando.olivero at usi.ch> wrote:
> Hi, Stef and Esteban, i'm sending an overview of the event handling
> mechanism of Gaucho. So we can discuss the additions of multitouch
> events and the design as well.
>
>
> Key classes: GUserInterface, GPeripheralDevice, GDisplay, GView and
> the new event model.
>
> GUserInterface: Collaborates with a sensor, and double dispatches the
> event to the proper peripheral device.
>
> GMouse,GKeyboard: a peripheral device that distinguishes the system
> event, and sends the user interface  specific reactions: such as
>
> #mouse: aGMouse entered: aGShape
> #keystroke: aGKeystroke from: aGKeyboard
>
> No reification of the events, just message passing amongst the user
> interface, the peripherals, the display, the views, and the shapes.
>
> EXAMPLE
> --------------------------------------------------------
> EVENTS: from the user to the shape
> --------------------------------------------------------
> 1)the user clicks on the mouse
> 2) a system event is announced
> 3) the user interface dispatches it to the attached mouse
> 4) the mouse detects that its a click to a particular shape on a view
> of the display and informs the user interface
> 5) the user interface informs the display of the click
>
> ------------------------------------------------------------------------
> VIEW: shape reacting to events and redrawing
> --------------------------------------------------------------------------
> 6) the display informs the active view
> 7) the active view informs the shape
> 8) the shape reacts to the click.
> 9)the display asks the shape wether it should redraw, and informs the
> damage recorder. Gaucho implements a visual garbage collector scheme,
> so the code is not polluted with #changed ,similar to eliminating the
> need to send #alloc and #dealloc on memory garbage collector. But this
> is surely for another thread.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GauchoUI-Core.st
Type: application/octet-stream
Size: 68055 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20120306/1729dfc9/attachment.st>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GauchoUI-Peripherals-Mouse.st
Type: application/octet-stream
Size: 18387 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20120306/1729dfc9/attachment-0001.st>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GauchoUI-Peripherals.st
Type: application/octet-stream
Size: 12319 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20120306/1729dfc9/attachment-0002.st>


More information about the Pharo-dev mailing list