Lines Matching refs:mLocked
90 mLocked.animationPending = false; in PointerController()
92 mLocked.displayWidth = -1; in PointerController()
93 mLocked.displayHeight = -1; in PointerController()
94 mLocked.displayOrientation = DISPLAY_ORIENTATION_0; in PointerController()
96 mLocked.presentation = PRESENTATION_POINTER; in PointerController()
97 mLocked.presentationChanged = false; in PointerController()
99 mLocked.inactivityTimeout = INACTIVITY_TIMEOUT_NORMAL; in PointerController()
101 mLocked.pointerFadeDirection = 0; in PointerController()
102 mLocked.pointerX = 0; in PointerController()
103 mLocked.pointerY = 0; in PointerController()
104 mLocked.pointerAlpha = 0.0f; // pointer is initially faded in PointerController()
105 mLocked.pointerSprite = mSpriteController->createSprite(); in PointerController()
106 mLocked.pointerIconChanged = false; in PointerController()
107 mLocked.requestedPointerType = mPolicy->getDefaultPointerIconId(); in PointerController()
109 mLocked.animationFrameIndex = 0; in PointerController()
110 mLocked.lastFrameUpdatedTime = 0; in PointerController()
112 mLocked.buttonState = 0; in PointerController()
114 mPolicy->loadPointerIcon(&mLocked.pointerIcon); in PointerController()
118 if (mLocked.pointerIcon.isValid()) { in PointerController()
119 mLocked.pointerIconChanged = true; in PointerController()
129 mLocked.pointerSprite.clear(); in ~PointerController()
131 for (size_t i = 0; i < mLocked.spots.size(); i++) { in ~PointerController()
132 delete mLocked.spots.itemAt(i); in ~PointerController()
134 mLocked.spots.clear(); in ~PointerController()
135 mLocked.recycledSprites.clear(); in ~PointerController()
147 if (mLocked.displayWidth <= 0 || mLocked.displayHeight <= 0) { in getBoundsLocked()
153 switch (mLocked.displayOrientation) { in getBoundsLocked()
156 *outMaxX = mLocked.displayHeight - 1; in getBoundsLocked()
157 *outMaxY = mLocked.displayWidth - 1; in getBoundsLocked()
160 *outMaxX = mLocked.displayWidth - 1; in getBoundsLocked()
161 *outMaxY = mLocked.displayHeight - 1; in getBoundsLocked()
177 setPositionLocked(mLocked.pointerX + deltaX, mLocked.pointerY + deltaY); in move()
186 if (mLocked.buttonState != buttonState) { in setButtonState()
187 mLocked.buttonState = buttonState; in setButtonState()
194 return mLocked.buttonState; in getButtonState()
210 mLocked.pointerX = minX; in setPositionLocked()
212 mLocked.pointerX = maxX; in setPositionLocked()
214 mLocked.pointerX = x; in setPositionLocked()
217 mLocked.pointerY = minY; in setPositionLocked()
219 mLocked.pointerY = maxY; in setPositionLocked()
221 mLocked.pointerY = y; in setPositionLocked()
230 *outX = mLocked.pointerX; in getPosition()
231 *outY = mLocked.pointerY; in getPosition()
242 mLocked.pointerFadeDirection = 0; in fade()
243 mLocked.pointerAlpha = 0.0f; in fade()
246 mLocked.pointerFadeDirection = -1; in fade()
259 mLocked.pointerFadeDirection = 0; in unfade()
260 mLocked.pointerAlpha = 1.0f; in unfade()
263 mLocked.pointerFadeDirection = 1; in unfade()
271 if (presentation == PRESENTATION_POINTER && mLocked.additionalMouseResources.empty()) { in setPresentation()
272 mPolicy->loadAdditionalMouseResources(&mLocked.additionalMouseResources, in setPresentation()
273 &mLocked.animationResources); in setPresentation()
276 if (mLocked.presentation != presentation) { in setPresentation()
277 mLocked.presentation = presentation; in setPresentation()
278 mLocked.presentationChanged = true; in setPresentation()
325 for (size_t i = 0; i < mLocked.spots.size(); i++) { in setSpots()
326 Spot* spot = mLocked.spots.itemAt(i); in setSpots()
349 if (mLocked.inactivityTimeout != inactivityTimeout) { in setInactivityTimeout()
350 mLocked.inactivityTimeout = inactivityTimeout; in setInactivityTimeout()
360 if (mLocked.presentation == PRESENTATION_POINTER) { in reloadPointerResources()
361 mLocked.additionalMouseResources.clear(); in reloadPointerResources()
362 mLocked.animationResources.clear(); in reloadPointerResources()
363 mPolicy->loadPointerIcon(&mLocked.pointerIcon); in reloadPointerResources()
364 mPolicy->loadAdditionalMouseResources(&mLocked.additionalMouseResources, in reloadPointerResources()
365 &mLocked.animationResources); in reloadPointerResources()
368 mLocked.presentationChanged = true; in reloadPointerResources()
383 if (mLocked.displayWidth != width || mLocked.displayHeight != height) { in setDisplayViewport()
384 mLocked.displayWidth = width; in setDisplayViewport()
385 mLocked.displayHeight = height; in setDisplayViewport()
389 mLocked.pointerX = (minX + maxX) * 0.5f; in setDisplayViewport()
390 mLocked.pointerY = (minY + maxY) * 0.5f; in setDisplayViewport()
392 mLocked.pointerX = 0; in setDisplayViewport()
393 mLocked.pointerY = 0; in setDisplayViewport()
399 if (mLocked.displayOrientation != orientation) { in setDisplayViewport()
403 float x = mLocked.pointerX + 0.5f; in setDisplayViewport()
404 float y = mLocked.pointerY + 0.5f; in setDisplayViewport()
408 switch (mLocked.displayOrientation) { in setDisplayViewport()
411 x = mLocked.displayWidth - y; in setDisplayViewport()
415 x = mLocked.displayWidth - x; in setDisplayViewport()
416 y = mLocked.displayHeight - y; in setDisplayViewport()
421 y = mLocked.displayHeight - temp; in setDisplayViewport()
430 y = mLocked.displayWidth - temp; in setDisplayViewport()
433 x = mLocked.displayWidth - x; in setDisplayViewport()
434 y = mLocked.displayHeight - y; in setDisplayViewport()
438 x = mLocked.displayHeight - y; in setDisplayViewport()
445 mLocked.pointerX = x - 0.5f; in setDisplayViewport()
446 mLocked.pointerY = y - 0.5f; in setDisplayViewport()
447 mLocked.displayOrientation = orientation; in setDisplayViewport()
455 if (mLocked.requestedPointerType != iconId) { in updatePointerIcon()
456 mLocked.requestedPointerType = iconId; in updatePointerIcon()
457 mLocked.presentationChanged = true; in updatePointerIcon()
466 mLocked.additionalMouseResources[iconId] = icon; in setCustomPointerIcon()
467 mLocked.requestedPointerType = iconId; in setCustomPointerIcon()
468 mLocked.presentationChanged = true; in setCustomPointerIcon()
515 mLocked.animationPending = false; in doAnimate()
526 nsecs_t frameDelay = timestamp - mLocked.animationTime; in doFadingAnimationLocked()
529 if (mLocked.pointerFadeDirection < 0) { in doFadingAnimationLocked()
530 mLocked.pointerAlpha -= float(frameDelay) / POINTER_FADE_DURATION; in doFadingAnimationLocked()
531 if (mLocked.pointerAlpha <= 0.0f) { in doFadingAnimationLocked()
532 mLocked.pointerAlpha = 0.0f; in doFadingAnimationLocked()
533 mLocked.pointerFadeDirection = 0; in doFadingAnimationLocked()
538 } else if (mLocked.pointerFadeDirection > 0) { in doFadingAnimationLocked()
539 mLocked.pointerAlpha += float(frameDelay) / POINTER_FADE_DURATION; in doFadingAnimationLocked()
540 if (mLocked.pointerAlpha >= 1.0f) { in doFadingAnimationLocked()
541 mLocked.pointerAlpha = 1.0f; in doFadingAnimationLocked()
542 mLocked.pointerFadeDirection = 0; in doFadingAnimationLocked()
550 for (size_t i = 0; i < mLocked.spots.size();) { in doFadingAnimationLocked()
551 Spot* spot = mLocked.spots.itemAt(i); in doFadingAnimationLocked()
555 mLocked.spots.removeAt(i); in doFadingAnimationLocked()
569 std::map<int32_t, PointerAnimation>::const_iterator iter = mLocked.animationResources.find( in doBitmapAnimationLocked()
570 mLocked.requestedPointerType); in doBitmapAnimationLocked()
571 if (iter == mLocked.animationResources.end()) { in doBitmapAnimationLocked()
575 if (timestamp - mLocked.lastFrameUpdatedTime > iter->second.durationPerFrame) { in doBitmapAnimationLocked()
578 int incr = (timestamp - mLocked.lastFrameUpdatedTime) / iter->second.durationPerFrame; in doBitmapAnimationLocked()
579 mLocked.animationFrameIndex += incr; in doBitmapAnimationLocked()
580 mLocked.lastFrameUpdatedTime += iter->second.durationPerFrame * incr; in doBitmapAnimationLocked()
581 while (mLocked.animationFrameIndex >= iter->second.animationFrames.size()) { in doBitmapAnimationLocked()
582 mLocked.animationFrameIndex -= iter->second.animationFrames.size(); in doBitmapAnimationLocked()
584 mLocked.pointerSprite->setIcon(iter->second.animationFrames[mLocked.animationFrameIndex]); in doBitmapAnimationLocked()
598 if (!mLocked.animationPending) { in startAnimationLocked()
599 mLocked.animationPending = true; in startAnimationLocked()
600 mLocked.animationTime = systemTime(SYSTEM_TIME_MONOTONIC); in startAnimationLocked()
608 nsecs_t timeout = mLocked.inactivityTimeout == INACTIVITY_TIMEOUT_SHORT in resetInactivityTimeoutLocked()
620 mLocked.pointerSprite->setLayer(Sprite::BASE_LAYER_POINTER); in updatePointerLocked()
621 mLocked.pointerSprite->setPosition(mLocked.pointerX, mLocked.pointerY); in updatePointerLocked()
623 if (mLocked.pointerAlpha > 0) { in updatePointerLocked()
624 mLocked.pointerSprite->setAlpha(mLocked.pointerAlpha); in updatePointerLocked()
625 mLocked.pointerSprite->setVisible(true); in updatePointerLocked()
627 mLocked.pointerSprite->setVisible(false); in updatePointerLocked()
630 if (mLocked.pointerIconChanged || mLocked.presentationChanged) { in updatePointerLocked()
631 if (mLocked.presentation == PRESENTATION_POINTER) { in updatePointerLocked()
632 if (mLocked.requestedPointerType == mPolicy->getDefaultPointerIconId()) { in updatePointerLocked()
633 mLocked.pointerSprite->setIcon(mLocked.pointerIcon); in updatePointerLocked()
636 mLocked.additionalMouseResources.find(mLocked.requestedPointerType); in updatePointerLocked()
637 if (iter != mLocked.additionalMouseResources.end()) { in updatePointerLocked()
639 mLocked.animationResources.find(mLocked.requestedPointerType); in updatePointerLocked()
640 if (anim_iter != mLocked.animationResources.end()) { in updatePointerLocked()
641 mLocked.animationFrameIndex = 0; in updatePointerLocked()
642 mLocked.lastFrameUpdatedTime = systemTime(SYSTEM_TIME_MONOTONIC); in updatePointerLocked()
645 mLocked.pointerSprite->setIcon(iter->second); in updatePointerLocked()
647 ALOGW("Can't find the resource for icon id %d", mLocked.requestedPointerType); in updatePointerLocked()
648 mLocked.pointerSprite->setIcon(mLocked.pointerIcon); in updatePointerLocked()
652 mLocked.pointerSprite->setIcon(mResources.spotAnchor); in updatePointerLocked()
654 mLocked.pointerIconChanged = false; in updatePointerLocked()
655 mLocked.presentationChanged = false; in updatePointerLocked()
662 for (size_t i = 0; i < mLocked.spots.size(); i++) { in getSpotLocked()
663 Spot* spot = mLocked.spots.itemAt(i); in getSpotLocked()
673 while (mLocked.spots.size() >= MAX_SPOTS) { in createAndAddSpotLocked()
676 spot = mLocked.spots.itemAt(0); in createAndAddSpotLocked()
677 mLocked.spots.removeAt(0); in createAndAddSpotLocked()
684 if (! mLocked.recycledSprites.isEmpty()) { in createAndAddSpotLocked()
685 sprite = mLocked.recycledSprites.top(); in createAndAddSpotLocked()
686 mLocked.recycledSprites.pop(); in createAndAddSpotLocked()
693 mLocked.spots.push(spot); in createAndAddSpotLocked()
698 for (size_t i = 0; i < mLocked.spots.size(); i++) { in removeFirstFadingSpotLocked()
699 Spot* spot = mLocked.spots.itemAt(i); in removeFirstFadingSpotLocked()
701 mLocked.spots.removeAt(i); in removeFirstFadingSpotLocked()
711 if (mLocked.recycledSprites.size() < MAX_RECYCLED_SPRITES) { in releaseSpotLocked()
712 mLocked.recycledSprites.push(spot->sprite); in releaseSpotLocked()
726 for (size_t i = 0; i < mLocked.spots.size(); i++) { in fadeOutAndReleaseAllSpotsLocked()
727 Spot* spot = mLocked.spots.itemAt(i); in fadeOutAndReleaseAllSpotsLocked()