From da14d647581751f3d2f6d651741eaec485e255b5 Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Mon, 14 Jan 2013 05:58:21 +0100
Subject: NEWT-MouseEvent getWheelRotation() API Update - Fixes Bug 659: NEWT
 Horizontal Scrolling Behavior (OSX, X11, Win32); Bug 639: High-Res
 Mouse-Wheel

- API update 'float getWheelRotation()':
  Usually a wheel rotation of > 0.0f is up, and < 0.0f is down.

  Usually a wheel rotations is considered a vertical scroll.
  If isShiftDown(), a wheel rotations is considered a horizontal scroll,
  where shift-up = left = > 0.0f, and shift-down = right = < 0.0f.

  However, on some OS this might be flipped due to the OS default behavior.
  The latter is true for OS X 10.7 (Lion) for example.

  The events will be send usually in steps of one, ie. -1.0f and 1.0f.
  Higher values may result due to fast scrolling.
  Fractional values may result due to slow scrolling with high resolution devices.

  The button number refers to the wheel number.

- Fix Bug 659: NEWT Horizontal Scrolling Behavior (OSX, X11, Win32)

  - See new API doc above

  - X11/Horiz: Keep using button1 and set SHIFT modifier

  - OSX/Horiz:
    - PAD: Use highes absolute scrolling value (Axis1/Axis2)
           and set SHIFT modifier for horizontal scrolling (Axis2)
    - XXX: Use deltaX for horizontal scrolling, detected by SHIFT modifier. (traditional)

  - Windows/Horiz:
    - Add WM_MOUSEHWHEEL support (-> set SHIFT modifier), but it's rarely impl. for trackpads!
    - Add exp. WM_HSCROLL, but it will only be delivered if windows has WS_HSCROLL, hence dead code!

  - Android:
    - Add ACTION_SCROLL (API Level 12), only used if layout is a scroll layout

    - Using GestureDetector to detect scroll even w/ pointerCount > 2, while:
         - skipping 1st scroll event (value too high)
         - skipping other events while in-scroll mode
         - waiting until all pointers were released before cont. normally
         - using View config's 1/touchSlope as scale factor

- Fix Bug 639: High-Res Mouse-Wheel
  - getWheelRotation() return value changed: int -> float
    allowing fractions, see API doc changes above.

  - Fractions are currently supported natively (API) on
    - Windows
    - OSX
    - Android

- AndroidNewtEventFactory ir refactored (requires an instance now) and
  AndroidNewtEventTranslator (event listener) is pulled our of Android WindowDriver.
---
 src/newt/native/bcm_vc_iv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/newt/native/bcm_vc_iv.c')

diff --git a/src/newt/native/bcm_vc_iv.c b/src/newt/native/bcm_vc_iv.c
index 0093da437..bbddf764b 100644
--- a/src/newt/native/bcm_vc_iv.c
+++ b/src/newt/native/bcm_vc_iv.c
@@ -117,7 +117,7 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_bcm_vc_iv_WindowDriver_initID
     sizeChangedID = (*env)->GetMethodID(env, clazz, "sizeChanged", "(ZIIZ)V");
     visibleChangedID = (*env)->GetMethodID(env, clazz, "visibleChanged", "(ZZ)V");
     windowDestroyNotifyID = (*env)->GetMethodID(env, clazz, "windowDestroyNotify", "(Z)Z");
-    sendMouseEventID = (*env)->GetMethodID(env, clazz, "sendMouseEvent", "(IIIIII)V");
+    sendMouseEventID = (*env)->GetMethodID(env, clazz, "sendMouseEvent", "(IIIIIF)V");
     sendKeyEventID = (*env)->GetMethodID(env, clazz, "sendKeyEvent", "(IIIC)V");
     if (windowCreatedID == NULL ||
         sizeChangedID == NULL ||
-- 
cgit v1.2.3