Package arc.mock
Class MockApplication
java.lang.Object
arc.mock.MockApplication
- All Implemented Interfaces:
Application,Disposable
-
Nested Class Summary
Nested classes/interfaces inherited from interface arc.Application
Application.ApplicationType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexit()Schedule an exit from the application.floatlongReturns the id of the current frame.intReturns a list of all the application listeners used.getType()voidPosts a runnable on the main loop thread.voidsetClipboardText(String text) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface arc.Application
addListener, defaultUpdate, dispose, getDnsServers, getJavaHeap, getMainThread, getNativeHeap, getVersion, isAndroid, isDesktop, isHeadless, isIOS, isMobile, isOnMainThread, isWeb, openFolder, openURI, removeListenerMethods inherited from interface arc.util.Disposable
isDisposed
-
Constructor Details
-
MockApplication
public MockApplication()
-
-
Method Details
-
getListeners
Description copied from interface:ApplicationReturns a list of all the application listeners used.- Specified by:
getListenersin interfaceApplication
-
getType
- Specified by:
getTypein interfaceApplication- Returns:
- what
Application.ApplicationTypethis application has, e.g. Android or Desktop
-
getFrameId
public long getFrameId()Description copied from interface:ApplicationReturns 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 theApplicationListener.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:
getFrameIdin interfaceApplication- Returns:
- the id of the current frame
-
getDeltaTime
public float getDeltaTime()- Specified by:
getDeltaTimein interfaceApplication- 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:
getFramesPerSecondin interfaceApplication- Returns:
- the average number of frames per second
-
getClipboardText
- Specified by:
getClipboardTextin interfaceApplication
-
setClipboardText
- Specified by:
setClipboardTextin interfaceApplication
-
post
Description copied from interface:ApplicationPosts a runnable on the main loop thread.- Specified by:
postin interfaceApplication
-
exit
public void exit()Description copied from interface:ApplicationSchedule 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:
exitin interfaceApplication
-