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()
Input
initialize
in interface Input
public void update()
Input
update
in interface Input
Input.setInputListener(com.jme3.input.RawInputListener)
public void destroy()
Input
public boolean isInitialized()
isInitialized
in interface Input
Input.initialize()
,
Input.destroy()
public void setInputListener(RawInputListener listener)
Input
setInputListener
in interface Input
public long getInputTimeNanos()
getInputTimeNanos
in interface Input
public void setSimulateMouse(boolean simulate)
TouchInput
setSimulateMouse
in interface TouchInput
simulate
- if mouse events should be generatedpublic boolean isSimulateMouse()
isSimulateMouse
in interface TouchInput
public void setSimulateKeyboard(boolean simulate)
TouchInput
setSimulateKeyboard
in interface TouchInput
simulate
- if keyboard events should be generatedpublic boolean isSimulateKeyboard()
isSimulateKeyboard
in interface TouchInput
public void setOmitHistoricEvents(boolean dontSendHistory)
TouchInput
setOmitHistoricEvents
in interface TouchInput
dontSendHistory
- 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)