public class IosInputHandler extends java.lang.Object implements TouchInput
ALL, KEYCODE_BACK, KEYCODE_HOME, KEYCODE_MENU, KEYCODE_SEARCH, KEYCODE_VOLUME_DOWN, KEYCODE_VOLUME_UP| Constructor and Description |
|---|
IosInputHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEvent(InputEvent event) |
void |
destroy()
Ceases listening to events from the device.
|
TouchEvent |
getFreeTouchEvent() |
long |
getInputTimeNanos() |
float |
getJmeX(float origX) |
float |
getJmeY(float origY) |
void |
initialize()
Initializes the native side to listen into events from the device.
|
void |
injectTouchDown(int pointerId,
long time,
float x,
float y) |
void |
injectTouchMove(int pointerId,
long time,
float x,
float y) |
void |
injectTouchUp(int pointerId,
long time,
float x,
float y) |
float |
invertX(float origX) |
float |
invertY(float origY) |
boolean |
isInitialized() |
boolean |
isMouseEventsInvertX() |
boolean |
isMouseEventsInvertY() |
boolean |
isSimulateKeyboard() |
boolean |
isSimulateMouse() |
void |
loadSettings(AppSettings settings) |
void |
setInputListener(RawInputListener listener)
Sets the input listener to receive events from this device.
|
void |
setOmitHistoricEvents(boolean dontSendHistory)
Set if historic android events should be transmitted, can be used to get better performance and less mem
|
void |
setSimulateKeyboard(boolean simulate)
Set if keyboard events should be generated
|
void |
setSimulateMouse(boolean simulate)
Set if mouse events should be generated
|
void |
update()
Queries the device for input.
|
public void initialize()
Inputinitialize in interface Inputpublic void update()
Inputupdate in interface InputInput.setInputListener(com.jme3.input.RawInputListener)public void destroy()
Inputpublic boolean isInitialized()
isInitialized in interface InputInput.initialize(),
Input.destroy()public void setInputListener(RawInputListener listener)
InputsetInputListener in interface Inputlistener - the desired listenerpublic long getInputTimeNanos()
getInputTimeNanos in interface Inputpublic void setSimulateMouse(boolean simulate)
TouchInputsetSimulateMouse in interface TouchInputsimulate - if mouse events should be generatedpublic boolean isSimulateMouse()
isSimulateMouse in interface TouchInputpublic void setSimulateKeyboard(boolean simulate)
TouchInputsetSimulateKeyboard in interface TouchInputsimulate - if keyboard events should be generatedpublic boolean isSimulateKeyboard()
isSimulateKeyboard in interface TouchInputpublic void setOmitHistoricEvents(boolean dontSendHistory)
TouchInputsetOmitHistoricEvents in interface TouchInputdontSendHistory - turn of historic events if true, false else and defaultpublic void loadSettings(AppSettings settings)
public boolean isMouseEventsInvertX()
public boolean isMouseEventsInvertY()
public float invertX(float origX)
public float invertY(float origY)
public float getJmeX(float origX)
public float getJmeY(float origY)
public TouchEvent getFreeTouchEvent()
public void addEvent(InputEvent event)
public void injectTouchDown(int pointerId,
long time,
float x,
float y)
public void injectTouchUp(int pointerId,
long time,
float x,
float y)
public void injectTouchMove(int pointerId,
long time,
float x,
float y)