Lines Matching refs:mPointerGesture
3656 mPointerGesture.reset();
4389 mPointerController->setSpots(mPointerGesture.currentGestureCoords,
4390 mPointerGesture.currentGestureIdToIndex,
4391 mPointerGesture.currentGestureIdBits);
4397 switch (mPointerGesture.currentGestureMode) {
4401 && (mPointerGesture.lastGestureMode == PointerGesture::SWIPE
4402 || mPointerGesture.lastGestureMode == PointerGesture::FREEFORM)) {
4434 bool down = mPointerGesture.currentGestureMode == PointerGesture::TAP
4435 || mPointerGesture.currentGestureMode == PointerGesture::TAP_DRAG
4436 || mPointerGesture.currentGestureMode == PointerGesture::BUTTON_CLICK_OR_DRAG
4437 || mPointerGesture.currentGestureMode == PointerGesture::PRESS
4438 || mPointerGesture.currentGestureMode == PointerGesture::SWIPE
4439 || mPointerGesture.currentGestureMode == PointerGesture::FREEFORM;
4442 && !mPointerGesture.lastGestureIdBits.isEmpty()
4443 && !mPointerGesture.currentGestureIdBits.isEmpty()) {
4444 BitSet32 movedGestureIdBits(mPointerGesture.currentGestureIdBits.value
4445 & mPointerGesture.lastGestureIdBits.value);
4446 moveNeeded = updateMovedPointers(mPointerGesture.currentGestureProperties,
4447 mPointerGesture.currentGestureCoords, mPointerGesture.currentGestureIdToIndex,
4448 mPointerGesture.lastGestureProperties,
4449 mPointerGesture.lastGestureCoords, mPointerGesture.lastGestureIdToIndex,
4457 BitSet32 dispatchedGestureIdBits(mPointerGesture.lastGestureIdBits);
4463 mPointerGesture.lastGestureProperties,
4464 mPointerGesture.lastGestureCoords, mPointerGesture.lastGestureIdToIndex,
4466 0, 0, mPointerGesture.downTime);
4475 & ~mPointerGesture.currentGestureIdBits.value;
4483 mPointerGesture.lastGestureProperties,
4484 mPointerGesture.lastGestureCoords, mPointerGesture.lastGestureIdToIndex,
4486 0, 0, mPointerGesture.downTime);
4497 mPointerGesture.currentGestureProperties,
4498 mPointerGesture.currentGestureCoords, mPointerGesture.currentGestureIdToIndex,
4500 0, 0, mPointerGesture.downTime);
4505 BitSet32 downGestureIdBits(mPointerGesture.currentGestureIdBits.value
4512 mPointerGesture.downTime = when;
4517 mPointerGesture.currentGestureProperties,
4518 mPointerGesture.currentGestureCoords, mPointerGesture.currentGestureIdToIndex,
4520 0, 0, mPointerGesture.downTime);
4525 if (mPointerGesture.currentGestureMode == PointerGesture::HOVER) {
4529 mPointerGesture.currentGestureProperties,
4530 mPointerGesture.currentGestureCoords, mPointerGesture.currentGestureIdToIndex,
4531 mPointerGesture.currentGestureIdBits, -1,
4532 0, 0, mPointerGesture.downTime);
4534 && !mPointerGesture.lastGestureIdBits.isEmpty()) {
4556 0, 0, mPointerGesture.downTime);
4561 mPointerGesture.lastGestureMode = mPointerGesture.currentGestureMode;
4563 mPointerGesture.lastGestureIdBits.clear();
4565 mPointerGesture.lastGestureIdBits = mPointerGesture.currentGestureIdBits;
4566 for (BitSet32 idBits(mPointerGesture.currentGestureIdBits); !idBits.isEmpty(); ) {
4568 uint32_t index = mPointerGesture.currentGestureIdToIndex[id];
4569 mPointerGesture.lastGestureProperties[index].copyFrom(
4570 mPointerGesture.currentGestureProperties[index]);
4571 mPointerGesture.lastGestureCoords[index].copyFrom(
4572 mPointerGesture.currentGestureCoords[index]);
4573 mPointerGesture.lastGestureIdToIndex[id] = index;
4580 if (!mPointerGesture.lastGestureIdBits.isEmpty()) {
4586 mPointerGesture.lastGestureProperties,
4587 mPointerGesture.lastGestureCoords, mPointerGesture.lastGestureIdToIndex,
4588 mPointerGesture.lastGestureIdBits, -1,
4589 0, 0, mPointerGesture.downTime);
4593 mPointerGesture.reset();
4614 if (mPointerGesture.lastGestureMode == PointerGesture::TAP) {
4615 if (when <= mPointerGesture.tapUpTime + mConfig.pointerGestureTapDragInterval) {
4617 getContext()->requestTimeoutAtTime(mPointerGesture.tapUpTime
4626 mPointerGesture.activeGestureId = -1;
4627 mPointerGesture.currentGestureMode = PointerGesture::NEUTRAL;
4628 mPointerGesture.currentGestureIdBits.clear();
4652 mPointerGesture.velocityTracker.addMovement(when,
4658 if (mPointerGesture.lastGestureMode != PointerGesture::HOVER
4659 && mPointerGesture.lastGestureMode != PointerGesture::TAP
4660 && mPointerGesture.lastGestureMode != PointerGesture::TAP_DRAG) {
4661 mPointerGesture.resetTap();
4670 int32_t lastActiveTouchId = mPointerGesture.activeTouchId;
4675 activeTouchId = mPointerGesture.activeTouchId =
4677 mPointerGesture.firstTouchTime = when;
4682 activeTouchId = mPointerGesture.activeTouchId =
4685 activeTouchId = mPointerGesture.activeTouchId = -1;
4692 mPointerGesture.resetQuietTime();
4694 isQuietTime = when < mPointerGesture.quietTime + mConfig.pointerGestureQuietInterval;
4696 if ((mPointerGesture.lastGestureMode == PointerGesture::PRESS
4697 || mPointerGesture.lastGestureMode == PointerGesture::SWIPE
4698 || mPointerGesture.lastGestureMode == PointerGesture::FREEFORM)
4704 } else if (mPointerGesture.lastGestureMode == PointerGesture::BUTTON_CLICK_OR_DRAG
4713 mPointerGesture.quietTime = when;
4722 ALOGD("Gestures: QUIET for next %0.3fms", (mPointerGesture.quietTime
4725 if (mPointerGesture.lastGestureMode != PointerGesture::QUIET) {
4729 mPointerGesture.activeGestureId = -1;
4730 mPointerGesture.currentGestureMode = PointerGesture::QUIET;
4731 mPointerGesture.currentGestureIdBits.clear();
4753 if (mPointerGesture.lastGestureMode != PointerGesture::BUTTON_CLICK_OR_DRAG) {
4755 mPointerGesture.activeGestureId = 0;
4766 if (mPointerGesture.velocityTracker.getVelocity(id, &vx, &vy)) {
4775 mPointerGesture.activeTouchId = activeTouchId = bestId;
4806 mPointerGesture.currentGestureMode = PointerGesture::BUTTON_CLICK_OR_DRAG;
4807 mPointerGesture.currentGestureIdBits.clear();
4808 mPointerGesture.currentGestureIdBits.markBit(mPointerGesture.activeGestureId);
4809 mPointerGesture.currentGestureIdToIndex[mPointerGesture.activeGestureId] = 0;
4810 mPointerGesture.currentGestureProperties[0].clear();
4811 mPointerGesture.currentGestureProperties[0].id = mPointerGesture.activeGestureId;
4812 mPointerGesture.currentGestureProperties[0].toolType = AMOTION_EVENT_TOOL_TYPE_FINGER;
4813 mPointerGesture.currentGestureCoords[0].clear();
4814 mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_X, x);
4815 mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_Y, y);
4816 mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_PRESSURE, 1.0f);
4819 if (mPointerGesture.lastGestureMode != PointerGesture::NEUTRAL) {
4826 if ((mPointerGesture.lastGestureMode == PointerGesture::HOVER
4827 || mPointerGesture.lastGestureMode == PointerGesture::TAP_DRAG)
4829 if (when <= mPointerGesture.tapDownTime + mConfig.pointerGestureTapInterval) {
4832 if (fabs(x - mPointerGesture.tapX) <= mConfig.pointerGestureTapSlop
4833 && fabs(y - mPointerGesture.tapY) <= mConfig.pointerGestureTapSlop) {
4838 mPointerGesture.tapUpTime = when;
4842 mPointerGesture.activeGestureId = 0;
4843 mPointerGesture.currentGestureMode = PointerGesture::TAP;
4844 mPointerGesture.currentGestureIdBits.clear();
4845 mPointerGesture.currentGestureIdBits.markBit(
4846 mPointerGesture.activeGestureId);
4847 mPointerGesture.currentGestureIdToIndex[
4848 mPointerGesture.activeGestureId] = 0;
4849 mPointerGesture.currentGestureProperties[0].clear();
4850 mPointerGesture.currentGestureProperties[0].id =
4851 mPointerGesture.activeGestureId;
4852 mPointerGesture.currentGestureProperties[0].toolType =
4854 mPointerGesture.currentGestureCoords[0].clear();
4855 mPointerGesture.currentGestureCoords[0].setAxisValue(
4856 AMOTION_EVENT_AXIS_X, mPointerGesture.tapX);
4857 mPointerGesture.currentGestureCoords[0].setAxisValue(
4858 AMOTION_EVENT_AXIS_Y, mPointerGesture.tapY);
4859 mPointerGesture.currentGestureCoords[0].setAxisValue(
4866 x - mPointerGesture.tapX,
4867 y - mPointerGesture.tapY);
4872 if (mPointerGesture.tapDownTime != LLONG_MIN) {
4874 (when - mPointerGesture.tapDownTime) * 0.000001f);
4888 mPointerGesture.activeGestureId = -1;
4889 mPointerGesture.currentGestureMode = PointerGesture::NEUTRAL;
4890 mPointerGesture.currentGestureIdBits.clear();
4899 mPointerGesture.currentGestureMode = PointerGesture::HOVER;
4900 if (mPointerGesture.lastGestureMode == PointerGesture::TAP) {
4901 if (when <= mPointerGesture.tapUpTime + mConfig.pointerGestureTapDragInterval) {
4904 if (fabs(x - mPointerGesture.tapX) <= mConfig.pointerGestureTapSlop
4905 && fabs(y - mPointerGesture.tapY) <= mConfig.pointerGestureTapSlop) {
4906 mPointerGesture.currentGestureMode = PointerGesture::TAP_DRAG;
4910 x - mPointerGesture.tapX,
4911 y - mPointerGesture.tapY);
4917 (when - mPointerGesture.tapUpTime) * 0.000001f);
4920 } else if (mPointerGesture.lastGestureMode == PointerGesture::TAP_DRAG) {
4921 mPointerGesture.currentGestureMode = PointerGesture::TAP_DRAG;
4945 if (mPointerGesture.currentGestureMode == PointerGesture::TAP_DRAG) {
4954 if (mPointerGesture.lastGestureMode != PointerGesture::HOVER) {
4957 mPointerGesture.activeGestureId = 0;
4964 mPointerGesture.currentGestureIdBits.clear();
4965 mPointerGesture.currentGestureIdBits.markBit(mPointerGesture.activeGestureId);
4966 mPointerGesture.currentGestureIdToIndex[mPointerGesture.activeGestureId] = 0;
4967 mPointerGesture.currentGestureProperties[0].clear();
4968 mPointerGesture.currentGestureProperties[0].id = mPointerGesture.activeGestureId;
4969 mPointerGesture.currentGestureProperties[0].toolType =
4971 mPointerGesture.currentGestureCoords[0].clear();
4972 mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_X, x);
4973 mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_Y, y);
4974 mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_PRESSURE,
4978 mPointerGesture.resetTap();
4979 mPointerGesture.tapDownTime = when;
4980 mPointerGesture.tapX = x;
4981 mPointerGesture.tapY = y;
4999 bool settled = when >= mPointerGesture.firstTouchTime
5001 if (mPointerGesture.lastGestureMode != PointerGesture::PRESS
5002 && mPointerGesture.lastGestureMode != PointerGesture::SWIPE
5003 && mPointerGesture.lastGestureMode != PointerGesture::FREEFORM) {
5010 "settle time remaining %0.3fms", (mPointerGesture.firstTouchTime
5017 mPointerGesture.currentGestureMode = mPointerGesture.lastGestureMode;
5021 mPointerGesture.currentGestureMode = PointerGesture::PRESS;
5022 mPointerGesture.activeGestureId = 0;
5023 mPointerGesture.referenceIdBits.clear();
5029 "settle time remaining %0.3fms", (mPointerGesture.firstTouchTime
5034 &mPointerGesture.referenceTouchX,
5035 &mPointerGesture.referenceTouchY);
5036 mPointerController->getPosition(&mPointerGesture.referenceGestureX,
5037 &mPointerGesture.referenceGestureY);
5042 & ~mPointerGesture.referenceIdBits.value); !idBits.isEmpty(); ) {
5044 mPointerGesture.referenceDeltas[id].dx = 0;
5045 mPointerGesture.referenceDeltas[id].dy = 0;
5047 mPointerGesture.referenceIdBits = mCurrentFingerIdBits;
5058 PointerGesture::Delta& delta = mPointerGesture.referenceDeltas[id];
5072 if (mPointerGesture.currentGestureMode == PointerGesture::PRESS) {
5075 for (BitSet32 idBits(mPointerGesture.referenceIdBits); !idBits.isEmpty(); ) {
5077 PointerGesture::Delta& delta = mPointerGesture.referenceDeltas[id];
5095 mPointerGesture.currentGestureMode = PointerGesture::FREEFORM;
5112 mPointerGesture.currentGestureMode = PointerGesture::FREEFORM;
5124 PointerGesture::Delta& delta1 = mPointerGesture.referenceDeltas[id1];
5125 PointerGesture::Delta& delta2 = mPointerGesture.referenceDeltas[id2];
5142 mPointerGesture.currentGestureMode = PointerGesture::SWIPE;
5154 mPointerGesture.currentGestureMode = PointerGesture::FREEFORM;
5160 } else if (mPointerGesture.currentGestureMode == PointerGesture::SWIPE) {
5169 mPointerGesture.currentGestureMode = PointerGesture::FREEFORM;
5175 if (mPointerGesture.currentGestureMode != PointerGesture::PRESS
5177 for (BitSet32 idBits(mPointerGesture.referenceIdBits); !idBits.isEmpty(); ) {
5179 PointerGesture::Delta& delta = mPointerGesture.referenceDeltas[id];
5184 mPointerGesture.referenceTouchX += commonDeltaX;
5185 mPointerGesture.referenceTouchY += commonDeltaY;
5193 mPointerGesture.referenceGestureX += commonDeltaX;
5194 mPointerGesture.referenceGestureY += commonDeltaY;
5198 if (mPointerGesture.currentGestureMode == PointerGesture::PRESS
5199 || mPointerGesture.currentGestureMode == PointerGesture::SWIPE) {
5204 activeTouchId, mPointerGesture.activeGestureId, currentFingerCount);
5206 ALOG_ASSERT(mPointerGesture.activeGestureId >= 0);
5208 mPointerGesture.currentGestureIdBits.clear();
5209 mPointerGesture.currentGestureIdBits.markBit(mPointerGesture.activeGestureId);
5210 mPointerGesture.currentGestureIdToIndex[mPointerGesture.activeGestureId] = 0;
5211 mPointerGesture.currentGestureProperties[0].clear();
5212 mPointerGesture.currentGestureProperties[0].id = mPointerGesture.activeGestureId;
5213 mPointerGesture.currentGestureProperties[0].toolType =
5215 mPointerGesture.currentGestureCoords[0].clear();
5216 mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_X,
5217 mPointerGesture.referenceGestureX);
5218 mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_Y,
5219 mPointerGesture.referenceGestureY);
5220 mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_PRESSURE, 1.0f);
5221 } else if (mPointerGesture.currentGestureMode == PointerGesture::FREEFORM) {
5226 activeTouchId, mPointerGesture.activeGestureId, currentFingerCount);
5228 ALOG_ASSERT(mPointerGesture.activeGestureId >= 0);
5230 mPointerGesture.currentGestureIdBits.clear();
5234 if (mPointerGesture.lastGestureMode != PointerGesture::FREEFORM) {
5239 usedGestureIdBits.markBit(mPointerGesture.activeGestureId);
5240 mPointerGesture.freeformTouchToGestureIdMap[activeTouchId] =
5241 mPointerGesture.activeGestureId;
5243 mPointerGesture.activeGestureId = -1;
5250 usedGestureIdBits = mPointerGesture.lastGestureIdBits;
5258 uint32_t upGestureId = mPointerGesture.freeformTouchToGestureIdMap[upTouchId];
5259 if (upGestureId == uint32_t(mPointerGesture.activeGestureId)) {
5260 mPointerGesture.activeGestureId = -1;
5271 mPointerGesture.activeGestureId);
5280 mPointerGesture.freeformTouchToGestureIdMap[touchId] = gestureId;
5287 gestureId = mPointerGesture.freeformTouchToGestureIdMap[touchId];
5294 mPointerGesture.currentGestureIdBits.markBit(gestureId);
5295 mPointerGesture.currentGestureIdToIndex[gestureId] = i;
5299 float deltaX = (pointer.x - mPointerGesture.referenceTouchX)
5301 float deltaY = (pointer.y - mPointerGesture.referenceTouchY)
5305 mPointerGesture.currentGestureProperties[i].clear();
5306 mPointerGesture.currentGestureProperties[i].id = gestureId;
5307 mPointerGesture.currentGestureProperties[i].toolType =
5309 mPointerGesture.currentGestureCoords[i].clear();
5310 mPointerGesture.currentGestureCoords[i].setAxisValue(
5311 AMOTION_EVENT_AXIS_X, mPointerGesture.referenceGestureX + deltaX);
5312 mPointerGesture.currentGestureCoords[i].setAxisValue(
5313 AMOTION_EVENT_AXIS_Y, mPointerGesture.referenceGestureY + deltaY);
5314 mPointerGesture.currentGestureCoords[i].setAxisValue(
5318 if (mPointerGesture.activeGestureId < 0) {
5319 mPointerGesture.activeGestureId =
5320 mPointerGesture.currentGestureIdBits.firstMarkedBit();
5323 "activeGestureId=%d", mPointerGesture.activeGestureId);
5336 mPointerGesture.currentGestureMode, mPointerGesture.currentGestureIdBits.value,
5337 mPointerGesture.lastGestureMode, mPointerGesture.lastGestureIdBits.value);
5338 for (BitSet32 idBits = mPointerGesture.currentGestureIdBits; !idBits.isEmpty(); ) {
5340 uint32_t index = mPointerGesture.currentGestureIdToIndex[id];
5341 const PointerProperties& properties = mPointerGesture.currentGestureProperties[index];
5342 const PointerCoords& coords = mPointerGesture.currentGestureCoords[index];
5350 for (BitSet32 idBits = mPointerGesture.lastGestureIdBits; !idBits.isEmpty(); ) {
5352 uint32_t index = mPointerGesture.lastGestureIdToIndex[id];
5353 const PointerProperties& properties = mPointerGesture.lastGestureProperties[index];
5354 const PointerCoords& coords = mPointerGesture.lastGestureCoords[index];