Lines Matching refs:entry
39 bool InputState::trackKey(const KeyEntry* entry, int32_t action, int32_t flags) { in trackKey() argument
42 if (entry->flags & AKEY_EVENT_FLAG_FALLBACK) { in trackKey()
44 if (mFallbackKeys.valueAt(i) == entry->keyCode) { in trackKey()
51 ssize_t index = findKeyMemento(entry); in trackKey()
76 ssize_t index = findKeyMemento(entry); in trackKey()
80 addKeyMemento(entry, flags); in trackKey()
89 bool InputState::trackMotion(const MotionEntry* entry, int32_t action, int32_t flags) { in trackMotion() argument
94 ssize_t index = findMotionMemento(entry, false /*hovering*/); in trackMotion()
102 entry->deviceId, entry->source, entry->displayId, actionMasked); in trackMotion()
108 ssize_t index = findMotionMemento(entry, false /*hovering*/); in trackMotion()
112 addMotionMemento(entry, flags, false /*hovering*/); in trackMotion()
119 if (entry->source & AINPUT_SOURCE_CLASS_NAVIGATION) { in trackMotion()
126 ssize_t index = findMotionMemento(entry, false /*hovering*/); in trackMotion()
128 if (entry->source & AINPUT_SOURCE_CLASS_JOYSTICK) { in trackMotion()
135 if (entry->pointerCoords[0].isEmpty()) { in trackMotion()
139 memento.setPointers(entry); in trackMotion()
141 } else if (!entry->pointerCoords[0].isEmpty()) { in trackMotion()
142 addMotionMemento(entry, flags, false /*hovering*/); in trackMotion()
150 memento.setPointers(entry); in trackMotion()
156 entry->deviceId, entry->source, entry->displayId, actionMasked); in trackMotion()
162 ssize_t index = findMotionMemento(entry, true /*hovering*/); in trackMotion()
170 entry->deviceId, entry->source, entry->displayId); in trackMotion()
177 ssize_t index = findMotionMemento(entry, true /*hovering*/); in trackMotion()
181 addMotionMemento(entry, flags, true /*hovering*/); in trackMotion()
190 ssize_t InputState::findKeyMemento(const KeyEntry* entry) const { in findKeyMemento()
193 if (memento.deviceId == entry->deviceId && memento.source == entry->source && in findKeyMemento()
194 memento.displayId == entry->displayId && memento.keyCode == entry->keyCode && in findKeyMemento()
195 memento.scanCode == entry->scanCode) { in findKeyMemento()
202 ssize_t InputState::findMotionMemento(const MotionEntry* entry, bool hovering) const { in findMotionMemento() argument
205 if (memento.deviceId == entry->deviceId && memento.source == entry->source && in findMotionMemento()
206 memento.displayId == entry->displayId && memento.hovering == hovering) { in findMotionMemento()
213 void InputState::addKeyMemento(const KeyEntry* entry, int32_t flags) { in addKeyMemento() argument
215 memento.deviceId = entry->deviceId; in addKeyMemento()
216 memento.source = entry->source; in addKeyMemento()
217 memento.displayId = entry->displayId; in addKeyMemento()
218 memento.keyCode = entry->keyCode; in addKeyMemento()
219 memento.scanCode = entry->scanCode; in addKeyMemento()
220 memento.metaState = entry->metaState; in addKeyMemento()
222 memento.downTime = entry->downTime; in addKeyMemento()
223 memento.policyFlags = entry->policyFlags; in addKeyMemento()
227 void InputState::addMotionMemento(const MotionEntry* entry, int32_t flags, bool hovering) { in addMotionMemento() argument
229 memento.deviceId = entry->deviceId; in addMotionMemento()
230 memento.source = entry->source; in addMotionMemento()
231 memento.displayId = entry->displayId; in addMotionMemento()
233 memento.xPrecision = entry->xPrecision; in addMotionMemento()
234 memento.yPrecision = entry->yPrecision; in addMotionMemento()
235 memento.downTime = entry->downTime; in addMotionMemento()
236 memento.setPointers(entry); in addMotionMemento()
238 memento.policyFlags = entry->policyFlags; in addMotionMemento()
242 void InputState::MotionMemento::setPointers(const MotionEntry* entry) { in setPointers() argument
243 pointerCount = entry->pointerCount; in setPointers()
244 for (uint32_t i = 0; i < entry->pointerCount; i++) { in setPointers()
245 pointerProperties[i].copyFrom(entry->pointerProperties[i]); in setPointers()
246 pointerCoords[i].copyFrom(entry->pointerCoords[i]); in setPointers()