synergynetframework.mtinput.win7
Class Win7TouchInput

java.lang.Object
  extended by synergynetframework.mtinput.win7.Win7TouchInput
All Implemented Interfaces:
IMultiTouchInputSource

public class Win7TouchInput
extends java.lang.Object
implements IMultiTouchInputSource

Input source for native Windows 7 WM_TOUCH messages for single/multi-touch.


Constructor Summary
Win7TouchInput(float width, float height, boolean sixtyFourBit)
          Instantiates a new win7 native touch source.
 
Method Summary
 void addTouchCursor(Windows7TouchEvent wmTouchEvent)
          Adds the touch cursor.
 boolean isSixtyFourBit()
          Checks if is sixty four bit.
 void registerMultiTouchEventListener(IMultiTouchEventListener listener)
          Register the listener to receive multi-touch events, as defined in IMultiTouchInputListener.
 void registerMultiTouchEventListener(IMultiTouchEventListener listener, int index)
          Register multi touch event listener.
 void removeTouchCursor(Windows7TouchEvent wmTouchEvent)
          Removes the touch cursor.
 void setClickSensitivity(long time, float distance)
          Determines whether two successive cursor add/remove events constitute a 'click'.
 void setSixtyFourBit(boolean sixtyFourBit)
          Sets the sixty four bit.
 void start()
          Start.
 void unregisterMultiTouchEventListener(IMultiTouchEventListener listener)
          Stops the listener from receiving multi-touch events.
 void update(float tpf)
          Update.
 void updateTouchCursor(Windows7TouchEvent wmTouchEvent)
          Update touch cursor.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Win7TouchInput

public Win7TouchInput(float width,
                      float height,
                      boolean sixtyFourBit)
Instantiates a new win7 native touch source.

Parameters:
width - the width
height - the height
sixtyFourBit - the sixty four bit
Method Detail

addTouchCursor

public void addTouchCursor(Windows7TouchEvent wmTouchEvent)
Adds the touch cursor.

Parameters:
wmTouchEvent - the wm touch event

isSixtyFourBit

public boolean isSixtyFourBit()
Checks if is sixty four bit.

Returns:
true, if is sixty four bit

registerMultiTouchEventListener

public void registerMultiTouchEventListener(IMultiTouchEventListener listener)
Description copied from interface: IMultiTouchInputSource
Register the listener to receive multi-touch events, as defined in IMultiTouchInputListener.

Specified by:
registerMultiTouchEventListener in interface IMultiTouchInputSource
Parameters:
listener - the listener

registerMultiTouchEventListener

public void registerMultiTouchEventListener(IMultiTouchEventListener listener,
                                            int index)
Description copied from interface: IMultiTouchInputSource
Register multi touch event listener.

Specified by:
registerMultiTouchEventListener in interface IMultiTouchInputSource
Parameters:
listener - the listener
index - the index

removeTouchCursor

public void removeTouchCursor(Windows7TouchEvent wmTouchEvent)
Removes the touch cursor.

Parameters:
wmTouchEvent - the wm touch event

setClickSensitivity

public void setClickSensitivity(long time,
                                float distance)
Description copied from interface: IMultiTouchInputSource
Determines whether two successive cursor add/remove events constitute a 'click'. Determines how close together in both time (in milliseconds) and space (in coordinate mode distance).

Specified by:
setClickSensitivity in interface IMultiTouchInputSource
Parameters:
time - in milliseconds
distance - in coordinate space

setSixtyFourBit

public void setSixtyFourBit(boolean sixtyFourBit)
Sets the sixty four bit.

Parameters:
sixtyFourBit - the new sixty four bit

start

public void start()
Start.


unregisterMultiTouchEventListener

public void unregisterMultiTouchEventListener(IMultiTouchEventListener listener)
Description copied from interface: IMultiTouchInputSource
Stops the listener from receiving multi-touch events.

Specified by:
unregisterMultiTouchEventListener in interface IMultiTouchInputSource
Parameters:
listener - the listener

update

public void update(float tpf)
            throws MultiTouchInputException
Description copied from interface: IMultiTouchInputSource
Update.

Specified by:
update in interface IMultiTouchInputSource
Parameters:
tpf - the tpf
Throws:
MultiTouchInputException - the multi touch input exception

updateTouchCursor

public void updateTouchCursor(Windows7TouchEvent wmTouchEvent)
Update touch cursor.

Parameters:
wmTouchEvent - the wm touch event