Multitouch (was Re: [squeak-dev] Multiple Hands)

Darius Clarke socinian at gmail.com
Wed Jun 26 21:36:00 UTC 2013


Isn't this what you're talking about?

http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/EventOverview/HandlingTouchEvents/HandlingTouchEvents.html
Touch
Events Represent Fingers on the Trackpad

Instead of handling a gesture, you could choose to track and handle the
“raw” touches that make up the gesture. But why might you make such a
choice? One obvious reason is that OS X does not recognize the particular
gesture you are interested in—that is, something other than magnify (pinch
in and out), rotate, or swipe. Or you want your view to respond to a
system-supported gesture, but you want more information about the gesture
than the AppKit framework currently provides; for example, you would like
to have anchor points for a zooming operation. Unless you have reasons such
as these, you should prefer gestures to raw touch events.

The following sections discuss the multi-touch sequence that delimits a
touch event in an abstract sense, point out important touch-event
attributes, and show you how to handle touch events.
A Multi-Touch Sequence

When a user touches a trackpad with one or more fingers and moves those
fingers over the trackpad, the hardware generates low-level events that
represent each of those fingers on the trackpad. The stream of events, as
with all type of events, is continuous. However, there is a logical unit of
touches that together, represent a *multi-touch sequence*. A multi-touch
sequence begins when the user puts one or more fingers on the trackpad. The
finger can move in various directions over the trackpad, and additional
fingers may touch the trackpad. The multi-touch sequence doesn’t end until
all of those fingers are lifted from the trackpad.

Within a multi-touch sequence, a finger on the trackpad typically goes
through distinct phases:

   -

   It touches down on the trackpad.
   -

   It can move in various directions at various speeds.
   -

   It can remain stationary.
   -

   It lifts from the trackpad.

The AppKit framework uses objects of the NSTouch class to represent touches
through the various phases of a multi-touch sequence. That is, an
NSTouch object
is a snapshot of a particular finger—a touch—on the trackpad in a
particular phase. For example, when a touch moves in a certain direction,
the AppKit represents it with an NSTouchinstance; it uses another
NSTouch object
to represent the same finger when it lifts from the trackpad.


On Wed, Jun 26, 2013 at 2:08 PM, Bert Freudenberg <bert at freudenbergs.de>wrote:

> On 26.06.2013, at 13:53, Darius Clarke <socinian at gmail.com> wrote:
>
> > Mac OS X supports multi-touch (i.e. MacBook touch pads and the Apple
> Magic Mouse)
>
> Nah, you cannot independently access the finger positions. We're really
> talking about touchscreen support.
>
> - Bert -
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20130626/5c491aea/attachment.htm


More information about the Squeak-dev mailing list