Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mighty Mouse scrolling Q&A




On Nov 30, 2005, at 12:49 PM, Clark Cox wrote:

Is this the same scrolling information that was already available to
Cocoa apps through -NSEvent's deltaX, deltaY and deltaZ methods? or is
it different in some way? Put another way, are NSEvent's methods based
on this event, and will I get back fractional values therefrom?

You will not get back fractional values from the Carbon event, because the Carbon event parameters are stored as integers.


The NSEvent methods read from data provided directly by CoreGraphics; they don't read from the Carbon event fields.

The -NSEvent deltaX/Y methods return the same data as the kEventParamMouseWheelDelta parameter in a kEventMouseWheel event, unless your app is linked on Tiger or later. A Tiger-linked app will potentially get back fractional values from -[NSEvent deltaX/Y/Z], but will still get back integer values from kEventParamMouseWheelDelta. A kEventMouseScroll event does not have a kEventParamMouseWheelDelta parameter; instead, it has kEventParamMouseWheelSmoothVertical/HorizontalDelta parameters.

The -NSEvent deviceDeltaX/Y methods return the same data as the kEventParamMouseWheelSmoothVertical/HorizontalDelta parameters in the kEventMouseScroll Carbon event.

-eric

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Mighty Mouse scrolling Q&A (From: Eric Schlegel <email@hidden>)
 >Re: Mighty Mouse scrolling Q&A (From: Eric Schlegel <email@hidden>)
 >Re: Mighty Mouse scrolling Q&A (From: Clark Cox <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.