<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>861</bug_id>
          
          <creation_ts>2013-10-15 13:54:48 +0200</creation_ts>
          <short_desc>NEWT: Unify MouseEvent Processing incl. gesture processing</short_desc>
          <delta_ts>2013-10-18 02:31:19 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Newt</product>
          <component>core</component>
          <version>1</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>800</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>rami.santina</cc>
          
          <cf_type>---</cf_type>
          <cf_scm_refs>bc72e232a4b74c2be8c91c540a7b6153bfefb8c0
b831ebadcaea1eea7370f7ec0bffc59eaba7a5ba
56322e1cf41bbb5bcc097164fb3ddcc0061c1c73
40863632d1428de015099b5967e5136425e99f25
a90bf31f8747dd38c61d518f8af4d4d4a64a8e90
c9837ef133ff3465d9b06f1907a7a320181ec97c
202834f148e0eb8c435af02850085d582b3006a4
8815245ebb9efc6d49052ff1fb34a3ee6ecfcc6b
d9fba0ea89ae71ce29fb528593fee24707b896ad
0eceb7df4b04a183a738474c0d7f4be41b6bcc0c
2ebf1bf35928e35ded6e38df64dee7aa578ae3c7</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>3111</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-10-15 13:54:48 +0200</bug_when>
    <thetext>Currently we process MouseEvents within NEWT as follows:

  sendMouseEvent/enqueueMouseEvent -&gt; doMouseEvent,
     - called by native code to be delivered via consumeMouseEvent (now or later)
     - events are validated (move/drag, boundaries)
     - missing events are synthesized (click, enter, ..)

as well as in several factories, i.e.:
    - AWTNewtEventFactory (1:1)

    - AndroidNewtEventFactory 
       - synthesized events .. (click, ..)
       - android typed gesture detection (drag -&gt; 1 finger scroll..)

The latter enqueues events do Window/Display directly to be consumed by WindowImpl.

Then users may have their own gesture detection etc.

+++

Solution shall unify event processing within NEWT via consumeEvent(..)
which represents a common entry point.

Gesture processing shall happen w/ NEWT type and 
a common infrastructure (GestureHandler, -Listener and -Event)
shall be supplied to allow:
  - impl. default gesture handlers (can be disabled)
  - user to add/remove gesture-handler and -listener 

the gesture-listener shall react on gesture-events.

+++

This allows our impl. to scale well, 
_especially_ in the advent of supporting more multiple pointer devices (-&gt; Win7/Win8, X11, ..).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3112</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-10-17 16:46:15 +0200</bug_when>
    <thetext>More unification of PointerEvent (mouse, pointer) processing.

56322e1cf41bbb5bcc097164fb3ddcc0061c1c73:    
    - Clarify &apos;Multiple-Pointer&apos; w/ button[mask] semantics
    
      - Pointer IDs start w/ 0 and are consecutive numbers.
    
      - &apos;button&apos; == triggering pointer-ID
    
      - buttonMask in modifiers show pressed button _and_ pointer-IDs
    
    - deprecated BUTTON_NUMBER -&gt; use BUTTON_COUNT (name semantics)

a90bf31f8747dd38c61d518f8af4d4d4a64a8e90:    
    Unify event processing in new doPointerEvent(..), which is also invoked from doMouseEvent(..),
    and consumePointerEvent().
    
    doPointerEvent(..): Validates and modifies event data and finally creates the event,
    where consumePointerEvent(..) calls gesture handlers and may synthesize events.
    
    Unifies native mouse and Android&apos;s pointer event, ready for Win7 touch.
    AndroidNewtEventFactory calls doPointerEvent(..) directly.
    
    Removed lots of duplicated pointer event handling code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3113</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-10-17 18:07:54 +0200</bug_when>
    <thetext>
202834f148e0eb8c435af02850085d582b3006a4:
    Refine Int -&gt; Enum conversion (commit 40863632d1428de015099b5967e5136425e99f25)
      - throw IllegalArgumentException if ordinal is out-of-range. Add API doc.
    
    - FFMPEGNatives
    - MouseEvent.PointerType</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3114</commentid>
    <comment_count>3</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-10-17 20:04:05 +0200</bug_when>
    <thetext>WindowImpl.doPointerEvent(..) Simplify pointer name-&gt;ID mapping, fix DEBUG.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3119</commentid>
    <comment_count>4</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-10-18 02:31:19 +0200</bug_when>
    <thetext>Clarify button-number and pointer-ID relation incl. case &apos;no button/pointer&apos;, i.e. button == 0, pointer-ID == -1
    
    doPointerEvent:
      - allow id==-1 -&gt; button==0 for no button, i.e. mouse move
    
    doMouseEvent:
      - keep button 0 value, i.e. map to pointer-ID -1</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>