Hi,
I'm trying to correctly respond to both "traditional mouse wheel" events and Mighty Mouse ("scroll ball") events from an application that runs on 10.4 Tiger (yes, old, but it has to run on Tiger, sorry).
By taking a look at how wxWidgets does it (lines 519-541 from http://trac.wxwidgets.org/browser/svn-wx/wxWidgets/trunk/src/osx/cocoa/window.mm?rev=63370 ), I see they get the Carbon event from the NSEvent by using its eventRef, and then they check it with kEventMouseScroll in order to see if it's a scroll wheel or a scroll ball.
Unfortunately, eventRef was introduced in 10.5 Leopard. And, unfortunately, I get errors if I try to access deviceDeltaX and deviceDeltaY if the event didn't came from an scroll ball. So, I need to check whether the event came from a scroll wheel or a scroll ball, so that I know if I need to access deltaX/deltaY or deviceDeltaX/deviceDeltaY.
Any suggestions on how can I achieve this on Tiger?
Thanks a lot!
I'm trying to correctly respond to both "traditional mouse wheel" events and Mighty Mouse ("scroll ball") events from an application that runs on 10.4 Tiger (yes, old, but it has to run on Tiger, sorry).
By taking a look at how wxWidgets does it (lines 519-541 from http://trac.wxwidgets.org/browser/svn-wx/wxWidgets/trunk/src/osx/cocoa/window.mm?rev=63370 ), I see they get the Carbon event from the NSEvent by using its eventRef, and then they check it with kEventMouseScroll in order to see if it's a scroll wheel or a scroll ball.
Unfortunately, eventRef was introduced in 10.5 Leopard. And, unfortunately, I get errors if I try to access deviceDeltaX and deviceDeltaY if the event didn't came from an scroll ball. So, I need to check whether the event came from a scroll wheel or a scroll ball, so that I know if I need to access deltaX/deltaY or deviceDeltaX/deviceDeltaY.
Any suggestions on how can I achieve this on Tiger?
Thanks a lot!