On Sat, Aug 15, 2009 at 11:47 AM, Florian Bösch <[email protected]> wrote:

>
> On Aug 15, 4:54 pm, Tristam MacDonald <[email protected]> wrote:
> > To my mind this is desirable, as long as it can be implemented for all
> > platforms.
>
> A quick peek for carbon reveals:
>        delta = c_long()
>        carbon.GetEventParameter(ev, kEventParamMouseWheelDelta,
>            typeSInt32, c_void_p(), sizeof(delta), c_void_p(),
>            byref(delta))
>        if axis.value == kEventMouseWheelAxisX:
>            self.dispatch_event('on_mouse_scroll',
>                x, y, delta.value, 0)
>        else:
>            self.dispatch_event('on_mouse_scroll',
>                x, y, 0, delta.value)


The Carbon code is not doing what I expected. That code is handling
kEventMouseWheel
events, and the kEventParamMouseWheelDelta returns lines scrolled (rather
than pixels), and doesn't support simultaneous horizontal and vertical
scrolling.

Instead we should probably upgrade to using kEventMouseScroll events, which
return kEventParamMouseWheelSmoothVerticalDelta and
kEventParamMouseWheelSmoothHorizontalDelta in pixels.

-- 
Tristam MacDonald
http://swiftcoder.wordpress.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to