[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ScrollWheel, Xdps and NSEvent modification
From: |
Richard Frith-Macdonald |
Subject: |
Re: ScrollWheel, Xdps and NSEvent modification |
Date: |
Fri, 1 Mar 2002 09:21:57 +0000 |
On Friday, March 1, 2002, at 08:52 AM, Pierre-Yves Rivaille wrote:
OK, I'll take the bait and say ...
Sounds like bloat - what was wrong with using the existing
otherEventWithType:... method?
That's what the method is there for (actually, I don't think you even
need
to
use that method).
It was not possible to create an event with deltaX, deltaY and deltaZ
on MOSX, which is strange because you can create every other kind of
mouse event programmatically.
2. NSMouseMoved and NS*MouseDragged event do now use deltaX, deltaY
and
deltaZ. It's not using eventNumber, clickCount and pressure anymore.
It's
not
raising an exception if you call those methods on those kind of
events, but
it will soon (once i'm sure it does not break anyone's code). I doubt
anyone
use those features, but you never know.
I forgot to say, that all these changes were MOSX-consistent, I did not
came with the silly idea to break things and create a deltaZ value :-).
The only additions I made was the new class method, which would,
anyhow, be needed as an internal method.
The question should have been : do we make this class method public or
not.
I don't really know why they did add this deltaZ stuff, I suppose the
only reason I see is that they had space to fill in the enum ...
Well, if it's MacOS-X bloat, I guess we need to add it :-)
I hadn't looked at the latest MacOS-X changes.
But we should not break the old code in order to add the new stuff -
that's my main concern.
Basically, to implement the MacOS-X documentaed API we need to have
these deltas AND eventNumber,
clickCount, pressure. We can't remove some values to make way for the
new, we have to increase
the size of the NSEvent object.
So ... the method you are proposing has too few arguments, it needs to
be -
+mouseEventWithType:location:modifierFlags:timestamp:windowNumber:context:
eventNumber:clickCount:pressure:deltaX:deltaY:deltaZ:
But there are mice with trackpoints instead of wheels (IBM did this at
one point on its desktop), I suppose this does explain why delta{X, Y,
Z} are float, no dual value thing.
IIRC, the trackpoint stuff is normally used for fine tuning of mouse
movements,
so I'd have been inclined to implement it as such
ie mapping a trackpoint movement to a small mouse movement, and applying
the current
trackpoint position in the backend as an offset to any mouse movement.
But if MacOS has added deltas, I guess we need to conform.
At some time in the future I expect to see true 3d pointer devices
become available
(ie things where a movement in the third dimension is as natural and
easy as a
movement in the normal plane - something I've not seen outside rather
expensive
virtual reality systems) and I we obviously do need an API revision for
that -
though perhaps the deltas extension would be sufficient for simple
applications.
- Re: ScrollWheel, Xdps and NSEvent modification, Richard Frith-Macdonald, 2002/03/01
- Re: ScrollWheel, Xdps and NSEvent modification, Richard Frith-Macdonald, 2002/03/01
- Re: ScrollWheel, Xdps and NSEvent modification, Pierre-Yves Rivaille, 2002/03/01
- Re: ScrollWheel, Xdps and NSEvent modification,
Richard Frith-Macdonald <=
- Re: ScrollWheel, Xdps and NSEvent modification, Pierre-Yves Rivaille, 2002/03/01
- Re: ScrollWheel, Xdps and NSEvent modification, Richard Frith-Macdonald, 2002/03/01
- Re: ScrollWheel, Xdps and NSEvent modification, Richard Frith-Macdonald, 2002/03/02
- NSEvent types ... was Re: ScrollWheel, Xdps and NSEvent modification, Richard Frith-Macdonald, 2002/03/02
- Re: ScrollWheel, Xdps and NSEvent modification, Pete French, 2002/03/01