Lines Matching refs:event
128 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
129 int deviceId = event.getDeviceId(); in onKeyDown()
132 if (currentShip.onKeyDown(keyCode, event)) { in onKeyDown()
133 step(event.getEventTime()); in onKeyDown()
138 return super.onKeyDown(keyCode, event); in onKeyDown()
142 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
143 int deviceId = event.getDeviceId(); in onKeyUp()
146 if (currentShip.onKeyUp(keyCode, event)) { in onKeyUp()
147 step(event.getEventTime()); in onKeyUp()
152 return super.onKeyUp(keyCode, event); in onKeyUp()
156 public boolean onGenericMotionEvent(MotionEvent event) { in onGenericMotionEvent() argument
157 mInputManager.onGenericMotionEvent(event); in onGenericMotionEvent()
162 int eventSource = event.getSource(); in onGenericMotionEvent()
165 && event.getAction() == MotionEvent.ACTION_MOVE) { in onGenericMotionEvent()
166 int id = event.getDeviceId(); in onGenericMotionEvent()
169 if (curShip.onGenericMotionEvent(event)) { in onGenericMotionEvent()
174 return super.onGenericMotionEvent(event); in onGenericMotionEvent()
465 private static float getCenteredAxis(MotionEvent event, InputDevice device, in getCenteredAxis() argument
467 final InputDevice.MotionRange range = device.getMotionRange(axis, event.getSource()); in getCenteredAxis()
470 final float value = historyPos < 0 ? event.getAxisValue(axis) in getCenteredAxis()
471 : event.getHistoricalAxisValue(axis, historyPos); in getCenteredAxis()
695 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
745 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
749 if (event.getRepeatCount() == 0) { in onKeyDown()
819 private void processJoystickInput(MotionEvent event, int historyPos) { in processJoystickInput() argument
828 mInputDevice = event.getDevice(); in processJoystickInput()
830 float x = getCenteredAxis(event, mInputDevice, MotionEvent.AXIS_X, historyPos); in processJoystickInput()
832 x = getCenteredAxis(event, mInputDevice, MotionEvent.AXIS_HAT_X, historyPos); in processJoystickInput()
835 x = getCenteredAxis(event, mInputDevice, MotionEvent.AXIS_Z, historyPos); in processJoystickInput()
838 float y = getCenteredAxis(event, mInputDevice, MotionEvent.AXIS_Y, historyPos); in processJoystickInput()
840 y = getCenteredAxis(event, mInputDevice, MotionEvent.AXIS_HAT_Y, historyPos); in processJoystickInput()
843 y = getCenteredAxis(event, mInputDevice, MotionEvent.AXIS_RZ, historyPos); in processJoystickInput()
848 GameView.this.step(historyPos < 0 ? event.getEventTime() : event in processJoystickInput() argument
852 public boolean onGenericMotionEvent(MotionEvent event) {
855 final int historySize = event.getHistorySize();
857 processJoystickInput(event, i);
861 processJoystickInput(event, -1);