Interface Input

All Known Subinterfaces:
JoyInput, KeyInput, MouseInput, TouchInput
All Known Implementing Classes:
AndroidJoyInput, AndroidJoyInput14, AndroidTouchInput, AndroidTouchInput14, AWTInput, AwtKeyInput, AWTKeyInput, AwtMouseInput, AWTMouseInput, DummyInput, DummyKeyInput, DummyMouseInput, GlfwJoystickInput, GlfwKeyInput, GlfwKeyInputVR, GlfwMouseInput, GlfwMouseInputVR, IosInputHandler, JInputJoyInput, LwjglKeyInput, LwjglMouseInput

public interface Input
Abstract interface for an input device.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Ceases listening to events from the device.
    long
     
    void
    Initializes the native side to listen into events from the device.
    boolean
     
    void
    Sets the input listener to receive events from this device.
    void
    Queries the device for input.
  • Method Details

    • initialize

      void initialize()
      Initializes the native side to listen into events from the device.
    • update

      void update()
      Queries the device for input. All events should be sent to the RawInputListener set with setInputListener.
      See Also:
    • destroy

      void destroy()
      Ceases listening to events from the device.
    • isInitialized

      boolean isInitialized()
      Returns:
      True if the device has been initialized and not destroyed.
      See Also:
    • setInputListener

      void setInputListener(RawInputListener listener)
      Sets the input listener to receive events from this device. The appropriate events should be dispatched through the callbacks in RawInputListener.
      Parameters:
      listener - the desired listener
    • getInputTimeNanos

      long getInputTimeNanos()
      Returns:
      The current absolute time as nanoseconds. This time is expected to be relative to the time given in InputEvents time property.