Lines Matching refs:MotionEvent

16 import android.view.MotionEvent;
35 private ArrayList<Pair<Integer, MotionEvent>> mQueuedEvents;
54 private boolean handleMotionEvent(MotionEvent event) { in handleMotionEvent()
63 if (action == MotionEvent.ACTION_DOWN) { in handleMotionEvent()
77 final MotionEvent.PointerCoords coords = new MotionEvent.PointerCoords(); in handleMotionEvent()
99 private boolean handleScrollEvent(MotionEvent event) { in handleScrollEvent()
111 final MotionEvent.PointerCoords coords = new MotionEvent.PointerCoords(); in handleScrollEvent()
119 final float hScroll = event.getAxisValue(MotionEvent.AXIS_HSCROLL) * in handleScrollEvent()
121 final float vScroll = event.getAxisValue(MotionEvent.AXIS_VSCROLL) * in handleScrollEvent()
128 private boolean handleMouseEvent(MotionEvent event) { in handleMouseEvent()
140 final MotionEvent.PointerCoords coords = new MotionEvent.PointerCoords(); in handleMouseEvent()
186 public boolean onTouchEvent(final MotionEvent event) { in onTouchEvent()
199 public boolean onMouseEvent(final MotionEvent event) { in onMouseEvent()
202 if (event.getToolType(0) == MotionEvent.TOOL_TYPE_MOUSE) { in onMouseEvent()
216 public boolean onMotionEvent(MotionEvent event) { in onMotionEvent()
220 if (action == MotionEvent.ACTION_SCROLL) { in onMotionEvent()
228 } else if ((action == MotionEvent.ACTION_HOVER_MOVE) || in onMotionEvent()
229 (action == MotionEvent.ACTION_HOVER_ENTER) || in onMotionEvent()
230 (action == MotionEvent.ACTION_HOVER_EXIT)) { in onMotionEvent()
249 ArrayList<Pair<Integer, MotionEvent>> events = mQueuedEvents; in flushEventQueue()
251 for (Pair<Integer, MotionEvent> pair : events) { in flushEventQueue()
311 public MotionEvent.PointerCoords getCoords() { in getCoords()
312 MotionEvent.PointerCoords coords = new MotionEvent.PointerCoords(); in getCoords()
356 MotionEvent.PointerProperties[] getPointerProperties(int source) { in getPointerProperties()
357 MotionEvent.PointerProperties[] props = in getPointerProperties()
358 new MotionEvent.PointerProperties[getPointerCount(source)]; in getPointerProperties()
362 MotionEvent.PointerProperties p = new MotionEvent.PointerProperties(); in getPointerProperties()
366 p.toolType = MotionEvent.TOOL_TYPE_FINGER; in getPointerProperties()
369 p.toolType = MotionEvent.TOOL_TYPE_MOUSE; in getPointerProperties()
378 MotionEvent.PointerCoords[] getPointerCoords(int source) { in getPointerCoords()
379 MotionEvent.PointerCoords[] coords = in getPointerCoords()
380 new MotionEvent.PointerCoords[getPointerCount(source)]; in getPointerCoords()
404 case MotionEvent.ACTION_POINTER_UP: in synthesizeNativePointer()
411 eventType = MotionEvent.ACTION_UP; in synthesizeNativePointer()
414 case MotionEvent.ACTION_CANCEL: in synthesizeNativePointer()
420 case MotionEvent.ACTION_POINTER_DOWN: in synthesizeNativePointer()
426 eventType = MotionEvent.ACTION_DOWN; in synthesizeNativePointer()
431 eventType = MotionEvent.ACTION_MOVE; in synthesizeNativePointer()
434 case MotionEvent.ACTION_HOVER_MOVE: in synthesizeNativePointer()
443 eventType = MotionEvent.ACTION_MOVE; in synthesizeNativePointer()
462 if (eventType == MotionEvent.ACTION_POINTER_DOWN || in synthesizeNativePointer()
463 eventType == MotionEvent.ACTION_POINTER_UP) { in synthesizeNativePointer()
466 action = (pointerIndex << MotionEvent.ACTION_POINTER_INDEX_SHIFT); in synthesizeNativePointer()
467 action &= MotionEvent.ACTION_POINTER_INDEX_MASK; in synthesizeNativePointer()
469 action |= (eventType & MotionEvent.ACTION_MASK); in synthesizeNativePointer()
471 (eventType == MotionEvent.ACTION_DOWN || in synthesizeNativePointer()
472 eventType == MotionEvent.ACTION_MOVE); in synthesizeNativePointer()
473 final MotionEvent event = MotionEvent.obtain( in synthesizeNativePointer()
481 /*buttonState*/ (isButtonDown ? MotionEvent.BUTTON_PRIMARY : 0), in synthesizeNativePointer()
491 if (eventType == MotionEvent.ACTION_POINTER_UP || in synthesizeNativePointer()
492 eventType == MotionEvent.ACTION_UP || in synthesizeNativePointer()
493 eventType == MotionEvent.ACTION_CANCEL || in synthesizeNativePointer()
494 eventType == MotionEvent.ACTION_HOVER_MOVE) in synthesizeNativePointer()