Package com.jme3.input.ios
Class IosInputHandler
java.lang.Object
com.jme3.input.ios.IosInputHandler
- All Implemented Interfaces:
Input,TouchInput
-
Field Summary
Fields inherited from interface com.jme3.input.TouchInput
ALL, KEYCODE_BACK, KEYCODE_HOME, KEYCODE_MENU, KEYCODE_SEARCH, KEYCODE_VOLUME_DOWN, KEYCODE_VOLUME_UP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEvent(InputEvent event) voiddestroy()Ceases listening to events from the device.longfloatgetJmeX(float origX) floatgetJmeY(float origY) voidInitializes the native side to listen into events from the device.voidinjectTouchDown(int pointerId, long time, float x, float y) voidinjectTouchMove(int pointerId, long time, float x, float y) voidinjectTouchUp(int pointerId, long time, float x, float y) floatinvertX(float origX) floatinvertY(float origY) booleanbooleanbooleanbooleanbooleanvoidloadSettings(AppSettings settings) voidsetInputListener(RawInputListener listener) Sets the input listener to receive events from this device.voidsetOmitHistoricEvents(boolean dontSendHistory) Set if historic android events should be transmitted, can be used to get better performance and less memvoidsetSimulateKeyboard(boolean simulate) Set if keyboard events should be generatedvoidsetSimulateMouse(boolean simulate) Set if mouse events should be generatedvoidupdate()Queries the device for input.
-
Constructor Details
-
IosInputHandler
public IosInputHandler()
-
-
Method Details
-
initialize
public void initialize()Description copied from interface:InputInitializes the native side to listen into events from the device.- Specified by:
initializein interfaceInput
-
update
public void update()Description copied from interface:InputQueries the device for input. All events should be sent to the RawInputListener set with setInputListener. -
destroy
public void destroy()Description copied from interface:InputCeases listening to events from the device. -
isInitialized
public boolean isInitialized()- Specified by:
isInitializedin interfaceInput- Returns:
- True if the device has been initialized and not destroyed.
- See Also:
-
setInputListener
Description copied from interface:InputSets the input listener to receive events from this device. The appropriate events should be dispatched through the callbacks in RawInputListener.- Specified by:
setInputListenerin interfaceInput- Parameters:
listener- the desired listener
-
getInputTimeNanos
public long getInputTimeNanos()- Specified by:
getInputTimeNanosin interfaceInput- Returns:
- The current absolute time as nanoseconds. This time is expected to be relative to the time given in InputEvents time property.
-
setSimulateMouse
public void setSimulateMouse(boolean simulate) Description copied from interface:TouchInputSet if mouse events should be generated- Specified by:
setSimulateMousein interfaceTouchInput- Parameters:
simulate- if mouse events should be generated
-
isSimulateMouse
public boolean isSimulateMouse()- Specified by:
isSimulateMousein interfaceTouchInput- Returns:
- true if mouse event simulation is enabled, false otherwise.
-
setSimulateKeyboard
public void setSimulateKeyboard(boolean simulate) Description copied from interface:TouchInputSet if keyboard events should be generated- Specified by:
setSimulateKeyboardin interfaceTouchInput- Parameters:
simulate- if keyboard events should be generated
-
isSimulateKeyboard
public boolean isSimulateKeyboard()- Specified by:
isSimulateKeyboardin interfaceTouchInput- Returns:
- true if key event simulation is enabled, false otherwise.
-
setOmitHistoricEvents
public void setOmitHistoricEvents(boolean dontSendHistory) Description copied from interface:TouchInputSet if historic android events should be transmitted, can be used to get better performance and less mem- Specified by:
setOmitHistoricEventsin interfaceTouchInput- Parameters:
dontSendHistory- turn of historic events if true, false else and default- See Also:
-
loadSettings
-
isMouseEventsInvertX
public boolean isMouseEventsInvertX() -
isMouseEventsInvertY
public boolean isMouseEventsInvertY() -
invertX
public float invertX(float origX) -
invertY
public float invertY(float origY) -
getJmeX
public float getJmeX(float origX) -
getJmeY
public float getJmeY(float origY) -
getFreeTouchEvent
-
addEvent
-
injectTouchDown
public void injectTouchDown(int pointerId, long time, float x, float y) -
injectTouchUp
public void injectTouchUp(int pointerId, long time, float x, float y) -
injectTouchMove
public void injectTouchMove(int pointerId, long time, float x, float y)
-