class TouchInput
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private TouchPipeline |
basePipeline |
private GestureSupport |
gestures |
private static TouchInput |
instance |
private TouchState |
state |
private TouchInputSupport |
touches |
private int |
touchRadius
This property determines the sensitivity of move events from touch.
|
Modifier | Constructor and Description |
---|---|
private |
TouchInput() |
Modifier and Type | Method and Description |
---|---|
private int |
countEvents(TouchState newState)
Calculate the number of touch point events that will be sent by
dispatchPoints().
|
private void |
dispatchPoint(Window window,
View view,
int state,
int id,
int x,
int y) |
(package private) TouchPipeline |
getBasePipeline()
Gets the base touch filter pipeline common to all touch devices
|
(package private) static TouchInput |
getInstance() |
(package private) void |
getState(TouchState result)
Copies the current state into the TouchState provided.
|
(package private) int |
getTouchRadius() |
private void |
postNoPoints(View view) |
private void |
postPoint(Window window,
View view,
int state,
TouchState.Point p) |
private void |
postPoints(Window window,
View view,
int[] states,
int[] ids,
int[] xs,
int[] ys) |
private void |
postTouchEvent(MonocleWindow window,
View view,
TouchState newState)
Sends updated touch points within the same View as last processed
touch points.
|
private void |
postTouchEvent(TouchState state,
int eventType)
Sends the same event type for all points in the given state
|
(package private) void |
setState(TouchState newState)
Called from the input processor to update the touch state and send
touch and mouse events.
|
private final int touchRadius
private static TouchInput instance
private TouchPipeline basePipeline
private TouchState state
private final GestureSupport gestures
private final TouchInputSupport touches
static TouchInput getInstance()
TouchPipeline getBasePipeline()
void getState(TouchState result)
result
- target into which to copy the touch statevoid setState(TouchState newState)
newState
- The updated touch stateprivate void postPoints(Window window, View view, int[] states, int[] ids, int[] xs, int[] ys)
private void postPoint(Window window, View view, int state, TouchState.Point p)
private void postNoPoints(View view)
private void postTouchEvent(TouchState state, int eventType)
state
- The state for which to process all pointseventType
- The type of TouchEvent to send (e.g. TouchEvent.PRESSED)private void postTouchEvent(MonocleWindow window, View view, TouchState newState)
window
- The current Windowview
- The current ViewnewState
- The updated touch pointsprivate int countEvents(TouchState newState)
int getTouchRadius()