Package arc.backend.robovm
Class IOSApplication
java.lang.Object
arc.backend.robovm.IOSApplication
- All Implemented Interfaces:
Application
,Disposable
-
Nested Class Summary
Nested classes/interfaces inherited from interface arc.Application
Application.ApplicationType
-
Constructor Summary
ConstructorDescriptionIOSApplication
(ApplicationListener listener, IOSApplicationConfiguration config) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a listener to handle events from the root view controllerprotected IOSGraphics
createGraphics
(float scale) protected IOSInput
void
exit()
Schedule an exit from the application.protected org.robovm.apple.coregraphics.CGRect
GL View spans whole screen, that is, even under the status bar.protected org.robovm.apple.coregraphics.CGRect
Returns a list of all the application listeners used.getType()
org.robovm.apple.uikit.UIViewController
Return the UI view controller of IOSApplicationorg.robovm.apple.uikit.UIWindow
Return the UI Window of IOSApplicationint
boolean
Launches the default browser to display a URI.void
Posts a runnable on the main loop thread.void
void
setClipboardText
(String text) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface arc.Application
addListener, defaultUpdate, dispose, getJavaHeap, getNativeHeap, isAndroid, isDesktop, isHeadless, isIOS, isMobile, isWeb, openFolder, removeListener
Methods inherited from interface arc.util.Disposable
isDisposed
-
Constructor Details
-
IOSApplication
-
-
Method Details
-
createGraphics
-
createInput
-
getUIViewController
public org.robovm.apple.uikit.UIViewController getUIViewController()Return the UI view controller of IOSApplication- Returns:
- the view controller of IOSApplication
-
getUIWindow
public org.robovm.apple.uikit.UIWindow getUIWindow()Return the UI Window of IOSApplication- Returns:
- the window
-
getBounds
protected org.robovm.apple.coregraphics.CGRect getBounds()GL View spans whole screen, that is, even under the status bar. iOS can also rotate the screen, which is not handled consistently over iOS versions. This method returns, in pixels, rectangle in which Arc draws.- Returns:
- dimensions of space we draw to, adjusted for device orientation
-
getCachedBounds
protected org.robovm.apple.coregraphics.CGRect getCachedBounds() -
getType
- Specified by:
getType
in interfaceApplication
- Returns:
- what
Application.ApplicationType
this application has, e.g. Android or Desktop
-
getVersion
public int getVersion()- Specified by:
getVersion
in interfaceApplication
- Returns:
- the Android API level on Android, the major OS version on iOS (5, 6, 7, ..), or 0 on the desktop.
-
openURI
Description copied from interface:Application
Launches the default browser to display a URI. If the default browser is not able to handle the specified URI, the application registered for handling URIs of the specified type is invoked. The application is determined from the protocol and path of the URI. A best effort is made to open the given URI; however, since external applications are involved, no guarantee can be made as to whether the URI was actually opened. If it is known that the URI was not opened, false will be returned; otherwise, true will be returned.- Specified by:
openURI
in interfaceApplication
- Parameters:
URI
- the URI to be opened.- Returns:
- false if it is known the uri was not opened, true otherwise.
-
post
Description copied from interface:Application
Posts a runnable on the main loop thread.- Specified by:
post
in interfaceApplication
-
processRunnables
public void processRunnables() -
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 interfaceApplication
-
getClipboardText
- Specified by:
getClipboardText
in interfaceApplication
-
setClipboardText
- Specified by:
setClipboardText
in interfaceApplication
-
getListeners
Description copied from interface:Application
Returns a list of all the application listeners used.- Specified by:
getListeners
in interfaceApplication
-
addViewControllerListener
Add a listener to handle events from the root view controller- Parameters:
listener
- The {#link IOSViewControllerListener} to add
-