Package arc.mock

Class MockApplication

java.lang.Object
arc.mock.MockApplication
All Implemented Interfaces:
Application, Disposable

public class MockApplication extends Object implements Application
  • Constructor Details

    • MockApplication

      public MockApplication()
  • Method Details

    • getListeners

      public Seq<ApplicationListener> getListeners()
      Description copied from interface: Application
      Returns a list of all the application listeners used.
      Specified by:
      getListeners in interface Application
    • getType

      public Application.ApplicationType getType()
      Specified by:
      getType in interface Application
      Returns:
      what Application.ApplicationType this application has, e.g. Android or Desktop
    • getFrameId

      public long getFrameId()
      Description copied from interface: Application
      Returns the id of the current frame. The general contract of this method is that the id is incremented only when the application is in the running state right before calling the ApplicationListener.update() method. Also, the id of the first frame is 0; the id of subsequent frames is guaranteed to take increasing values for 263-1 rendering cycles.
      Specified by:
      getFrameId in interface Application
      Returns:
      the id of the current frame
    • getDeltaTime

      public float getDeltaTime()
      Specified by:
      getDeltaTime in interface Application
      Returns:
      the time span between the current frame and the last frame in seconds. Might be smoothed over n frames.
    • getFramesPerSecond

      public int getFramesPerSecond()
      Specified by:
      getFramesPerSecond in interface Application
      Returns:
      the average number of frames per second
    • getClipboardText

      public String getClipboardText()
      Specified by:
      getClipboardText in interface Application
    • setClipboardText

      public void setClipboardText(String text)
      Specified by:
      setClipboardText in interface Application
    • post

      public void post(Runnable runnable)
      Description copied from interface: Application
      Posts a runnable on the main loop thread.
      Specified by:
      post in interface Application
    • exit

      public void exit()
      Description copied from interface: Application
      Schedule an exit from the application. On android, this will cause a call to pause() and dispose() some time in the future, it will not immediately finish your application. On iOS this should be avoided in production as it breaks Apples guidelines.
      Specified by:
      exit in interface Application