Difference between revisions of "Application"

From GiderosMobile
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 +
<!-- GIDEROSOBJ:Application -->
 
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/>
 
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/>
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
Line 10: Line 11:
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Methods</translate> ===
 
=== <translate>Methods</translate> ===
[[Special:MyLanguage/Application:canOpenUrl|Application:canOpenUrl]] ''<translate>Tests if it is possible to open provided url</translate>''<br/>
+
[[Special:MyLanguage/Application:canOpenUrl|Application:canOpenUrl]] ''<translate>Tests if it is possible to open provided url</translate>''<br/><!-- GIDEROSMTD:Application:canOpenUrl -->
[[Special:MyLanguage/Application:configureFrustum|Application:configureFrustum]] ''<translate>Configure the projection for 3D perspective.</translate>''<br/>
+
[[Special:MyLanguage/Application:configureFrustum|Application:configureFrustum]] ''<translate>Configure the projection for 3D perspective.</translate>''<br/><!-- GIDEROSMTD:Application:configureFrustum -->
[[Special:MyLanguage/Application:exit|Application:exit]] ''<translate>Application - terminates the application</translate>''<br/>
+
[[Special:MyLanguage/Application:exit|Application:exit]] ''<translate>terminates the application</translate>''<br/><!-- GIDEROSMTD:Application:exit -->
[[Special:MyLanguage/Application:getApiVersion|Application:getApiVersion]] ''<translate>Application - returns the API version</translate>''<br/>
+
[[Special:MyLanguage/Application:getApiVersion|Application:getApiVersion]] ''<translate>returns the API version</translate>''<br/><!-- GIDEROSMTD:Application:getApiVersion -->
[[Special:MyLanguage/Application:getAppId|Application:getAppId]] ''<translate>Application - returns the app id or bundle id</translate>''<br/>
+
[[Special:MyLanguage/Application:getAppId|Application:getAppId]] ''<translate>returns the app id or bundle id</translate>''<br/><!-- GIDEROSMTD:Application:getAppId -->
[[Special:MyLanguage/Application:getBackgroundColor|Application:getBackgroundColor]] ''<translate>Application - returns the background color in hexadecimal format</translate>''<br/>
+
[[Special:MyLanguage/Application:getBackgroundColor|Application:getBackgroundColor]] ''<translate>returns the background color in hexadecimal format</translate>''<br/><!-- GIDEROSMTD:Application:getBackgroundColor -->
[[Special:MyLanguage/Application:getContentHeight|Application:getContentHeight]] ''<translate>Application - returns content height</translate>''<br/>
+
[[Special:MyLanguage/Application:getContentHeight|Application:getContentHeight]] ''<translate>returns content height</translate>''<br/><!-- GIDEROSMTD:Application:getContentHeight -->
[[Special:MyLanguage/Application:getContentWidth|Application:getContentWidth]] ''<translate>Application - returns content width</translate>''<br/>
+
[[Special:MyLanguage/Application:getContentWidth|Application:getContentWidth]] ''<translate>returns content width</translate>''<br/><!-- GIDEROSMTD:Application:getContentWidth -->
[[Special:MyLanguage/Application:getDeviceHeight|Application:getDeviceHeight]] ''<translate>Application - returns the physical height of the device in pixels</translate>''<br/>
+
[[Special:MyLanguage/Application:getDeviceHeight|Application:getDeviceHeight]] ''<translate>returns the physical height of the device in pixels</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceHeight -->
[[Special:MyLanguage/Application:getDeviceInfo|Application:getDeviceInfo]] ''<translate>Application - returns information about device</translate>''<br/>
+
[[Special:MyLanguage/Application:getDeviceInfo|Application:getDeviceInfo]] ''<translate>returns information about device</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceInfo -->
[[Special:MyLanguage/Application:getDeviceOrientation|Application:getDeviceOrientation]] ''<translate>Get the device orientation</translate>''<br/>
+
[[Special:MyLanguage/Application:getDeviceOrientation|Application:getDeviceOrientation]] ''<translate>Get the device orientation</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceOrientation -->
[[Special:MyLanguage/Application:getDeviceSafeArea|Application:getDeviceSafeArea]] ''<translate>Application - returns the safe display area bounds</translate>''<br/>
+
[[Special:MyLanguage/Application:getDeviceSafeArea|Application:getDeviceSafeArea]] ''<translate>returns the safe display area bounds</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceSafeArea -->
[[Special:MyLanguage/Application:getDeviceWidth|Application:getDeviceWidth]] ''<translate>Application - returns the physical width of the device in pixels</translate>''<br/>
+
[[Special:MyLanguage/Application:getDeviceWidth|Application:getDeviceWidth]] ''<translate>returns the physical width of the device in pixels</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceWidth -->
[[Special:MyLanguage/Application:getFps|Application:getFps]] ''<translate>Application - returns the frame rate of the application</translate>''<br/>
+
[[Special:MyLanguage/Application:getFps|Application:getFps]] ''<translate>returns the frame rate of the application</translate>''<br/><!-- GIDEROSMTD:Application:getFps -->
[[Special:MyLanguage/Application:getLanguage|Application:getLanguage]] ''<translate>Application - returns the user language</translate>''<br/>
+
[[Special:MyLanguage/Application:getLanguage|Application:getLanguage]] ''<translate>returns the user language</translate>''<br/><!-- GIDEROSMTD:Application:getLanguage -->
[[Special:MyLanguage/Application:getLocale|Application:getLocale]] ''<translate>Application - returns the device locale</translate>''<br/>
+
[[Special:MyLanguage/Application:getLocale|Application:getLocale]] ''<translate>returns the device locale</translate>''<br/><!-- GIDEROSMTD:Application:getLocale -->
[[Special:MyLanguage/Application:getLogicalBounds|Application:getLogicalBounds]] ''<translate>Application - returns the physical screen bounds in logical space</translate>''<br/>
+
[[Special:MyLanguage/Application:getLogicalBounds|Application:getLogicalBounds]] ''<translate>returns the physical screen bounds in logical space</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalBounds -->
[[Special:MyLanguage/Application:getLogicalHeight|Application:getLogicalHeight]] ''<translate>Application - returns the logical height of the application</translate>''<br/>
+
[[Special:MyLanguage/Application:getLogicalHeight|Application:getLogicalHeight]] ''<translate>returns the logical height of the application</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalHeight -->
[[Special:MyLanguage/Application:getLogicalScaleX|Application:getLogicalScaleX]] ''<translate>Application - returns the scaling of automatic screen scaling on the x-axis</translate>''<br/>
+
[[Special:MyLanguage/Application:getLogicalScaleX|Application:getLogicalScaleX]] ''<translate>returns the scaling of automatic screen scaling on the x-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalScaleX -->
[[Special:MyLanguage/Application:getLogicalScaleY|Application:getLogicalScaleY]] ''<translate>Application - returns the scaling of automatic screen scaling on the y-axis</translate>''<br/>
+
[[Special:MyLanguage/Application:getLogicalScaleY|Application:getLogicalScaleY]] ''<translate>returns the scaling of automatic screen scaling on the y-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalScaleY -->
[[Special:MyLanguage/Application:getLogicalTranslateX|Application:getLogicalTranslateX]] ''<translate>Application - returns the translation of automatic screen scaling on the x-axis</translate>''<br/>
+
[[Special:MyLanguage/Application:getLogicalTranslateX|Application:getLogicalTranslateX]] ''<translate>returns the translation of automatic screen scaling on the x-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalTranslateX -->
[[Special:MyLanguage/Application:getLogicalTranslateY|Application:getLogicalTranslateY]] ''<translate>Application - returns the translation of automatic screen scaling on the y-axis</translate>''<br/>
+
[[Special:MyLanguage/Application:getLogicalTranslateY|Application:getLogicalTranslateY]] ''<translate>returns the translation of automatic screen scaling on the y-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalTranslateY -->
[[Special:MyLanguage/Application:getLogicalWidth|Application:getLogicalWidth]] ''<translate>Application - returns the logical width of the application</translate>''<br/>
+
[[Special:MyLanguage/Application:getLogicalWidth|Application:getLogicalWidth]] ''<translate>returns the logical width of the application</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalWidth -->
[[Special:MyLanguage/Application:getOrientation|Application:getOrientation]] ''<translate>Application - returns the orientation of the application</translate>''<br/>
+
[[Special:MyLanguage/Application:getOrientation|Application:getOrientation]] ''<translate>returns the orientation of the application</translate>''<br/><!-- GIDEROSMTD:Application:getOrientation -->
[[Special:MyLanguage/Application:getScaleMode|Application:getScaleMode]] ''<translate>Application - returns the automatic scale mode of the application</translate>''<br/>
+
[[Special:MyLanguage/Application:getScaleMode|Application:getScaleMode]] ''<translate>returns the automatic scale mode of the application</translate>''<br/><!-- GIDEROSMTD:Application:getScaleMode -->
[[Special:MyLanguage/Application:getScreenDensity|Application:getScreenDensity]] ''<translate>Application - returns the screen density in pixels per inch</translate>''<br/>
+
[[Special:MyLanguage/Application:getScreenDensity|Application:getScreenDensity]] ''<translate>returns the screen density in pixels per inch</translate>''<br/><!-- GIDEROSMTD:Application:getScreenDensity -->
[[Special:MyLanguage/Application:getTextureMemoryUsage|Application:getTextureMemoryUsage]] ''<translate>Application - returns the texture memory usage in Kbytes</translate>''<br/>
+
[[Special:MyLanguage/Application:getTextureMemoryUsage|Application:getTextureMemoryUsage]] ''<translate>returns the texture memory usage in Kbytes</translate>''<br/><!-- GIDEROSMTD:Application:getTextureMemoryUsage -->
[[Special:MyLanguage/Application:isPlayerMode|Application:isPlayerMode]] ''<translate>Check if app runs on player</translate>''<br/>
+
[[Special:MyLanguage/Application:isPlayerMode|Application:isPlayerMode]] ''<translate>Check if app runs on player</translate>''<br/><!-- GIDEROSMTD:Application:isPlayerMode -->
[[Special:MyLanguage/Application:openUrl|Application:openUrl]] ''<translate>Application - opens the given URL in the appropriate application</translate>''<br/>
+
[[Special:MyLanguage/Application:openUrl|Application:openUrl]] ''<translate>opens the given URL in the appropriate application</translate>''<br/><!-- GIDEROSMTD:Application:openUrl -->
[[Special:MyLanguage/Application:setBackgroundColor|Application:setBackgroundColor]] ''<translate>Application - sets the background color in hexadecimal format</translate>''<br/>
+
[[Special:MyLanguage/Application:setBackgroundColor|Application:setBackgroundColor]] ''<translate>sets the background color in hexadecimal format</translate>''<br/><!-- GIDEROSMTD:Application:setBackgroundColor -->
[[Special:MyLanguage/Application:setFps|Application:setFps]] ''<translate>Application - sets the frame rate of the application</translate>''<br/>
+
[[Special:MyLanguage/Application:setFps|Application:setFps]] ''<translate>sets the frame rate of the application</translate>''<br/><!-- GIDEROSMTD:Application:setFps -->
[[Special:MyLanguage/Application:setFullScreen|Application:setFullScreen]] ''<translate>Full screen or window mode</translate>''<br/>
+
[[Special:MyLanguage/Application:setFullScreen|Application:setFullScreen]] ''<translate>Full screen or window mode</translate>''<br/><!-- GIDEROSMTD:Application:setFullScreen -->
[[Special:MyLanguage/Application:setKeepAwake|Application:setKeepAwake]] ''<translate>Application - enables/disables screen dimming and device sleeping</translate>''<br/>
+
[[Special:MyLanguage/Application:setKeepAwake|Application:setKeepAwake]] ''<translate>enables/disables screen dimming and device sleeping</translate>''<br/><!-- GIDEROSMTD:Application:setKeepAwake -->
[[Special:MyLanguage/Application:setKeyboardVisibility|Application:setKeyboardVisibility]] <br/>
+
[[Special:MyLanguage/Application:setKeyboardVisibility|Application:setKeyboardVisibility]] <br/><!-- GIDEROSMTD:Application:setKeyboardVisibility -->
[[Special:MyLanguage/Application:setLogicalDimensions|Application:setLogicalDimensions]] ''<translate>Application - sets the logical dimensions of the application</translate>''<br/>
+
[[Special:MyLanguage/Application:setLogicalDimensions|Application:setLogicalDimensions]] ''<translate>sets the logical dimensions of the application</translate>''<br/><!-- GIDEROSMTD:Application:setLogicalDimensions -->
[[Special:MyLanguage/Application:setOrientation|Application:setOrientation]] ''<translate>Application - sets the orientation of the application</translate>''<br/>
+
[[Special:MyLanguage/Application:setOrientation|Application:setOrientation]] ''<translate>sets the orientation of the application</translate>''<br/><!-- GIDEROSMTD:Application:setOrientation -->
[[Special:MyLanguage/Application:setScaleMode|Application:setScaleMode]] ''<translate>Application - sets the automatic scale mode of the application</translate>''<br/>
+
[[Special:MyLanguage/Application:setScaleMode|Application:setScaleMode]] ''<translate>sets the automatic scale mode of the application</translate>''<br/><!-- GIDEROSMTD:Application:setScaleMode -->
[[Special:MyLanguage/Application:setWindowSize|Application:setWindowSize]] ''<translate>Sets desktop window to a specific size</translate>''<br/>
+
[[Special:MyLanguage/Application:setWindowSize|Application:setWindowSize]] ''<translate>Sets desktop window to a specific size</translate>''<br/><!-- GIDEROSMTD:Application:setWindowSize -->
[[Special:MyLanguage/Application:vibrate|Application:vibrate]] ''<translate>Application - vibrates the device</translate>''<br/>
+
[[Special:MyLanguage/Application:vibrate|Application:vibrate]] ''<translate>vibrates the device</translate>''<br/><!-- GIDEROSMTD:Application:vibrate -->
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Events</translate> ===
 
=== <translate>Events</translate> ===
 
=== <translate>Constants</translate> ===
 
=== <translate>Constants</translate> ===
[[Special:MyLanguage/Application.LANDSCAPE_LEFT|Application.LANDSCAPE_LEFT]]<br/>
+
[[Special:MyLanguage/Application.LANDSCAPE_LEFT|Application.LANDSCAPE_LEFT]]<br/><!-- GIDEROSCST:Application.LANDSCAPE_LEFT -->
[[Special:MyLanguage/Application.LANDSCAPE_RIGHT|Application.LANDSCAPE_RIGHT]]<br/>
+
[[Special:MyLanguage/Application.LANDSCAPE_RIGHT|Application.LANDSCAPE_RIGHT]]<br/><!-- GIDEROSCST:Application.LANDSCAPE_RIGHT -->
[[Special:MyLanguage/Application.PORTRAIT|Application.PORTRAIT]]<br/>
+
[[Special:MyLanguage/Application.PORTRAIT|Application.PORTRAIT]]<br/><!-- GIDEROSCST:Application.PORTRAIT -->
[[Special:MyLanguage/Application.PORTRAIT_UPSIDE_DOWN|Application.PORTRAIT_UPSIDE_DOWN]]<br/>
+
[[Special:MyLanguage/Application.PORTRAIT_UPSIDE_DOWN|Application.PORTRAIT_UPSIDE_DOWN]]<br/><!-- GIDEROSCST:Application.PORTRAIT_UPSIDE_DOWN -->
 
|}
 
|}

Revision as of 14:55, 31 August 2018

Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.png
Available since: Gideros 2011.6
Inherits from: Object

Description


Application class contains the common functions that's available to the current application. There is a global variable application of type Application to access these functions.

Methods

Application:canOpenUrl Tests if it is possible to open provided url
Application:configureFrustum Configure the projection for 3D perspective.
Application:exit terminates the application
Application:getApiVersion returns the API version
Application:getAppId returns the app id or bundle id
Application:getBackgroundColor returns the background color in hexadecimal format
Application:getContentHeight returns content height
Application:getContentWidth returns content width
Application:getDeviceHeight returns the physical height of the device in pixels
Application:getDeviceInfo returns information about device
Application:getDeviceOrientation Get the device orientation
Application:getDeviceSafeArea returns the safe display area bounds
Application:getDeviceWidth returns the physical width of the device in pixels
Application:getFps returns the frame rate of the application
Application:getLanguage returns the user language
Application:getLocale returns the device locale
Application:getLogicalBounds returns the physical screen bounds in logical space
Application:getLogicalHeight returns the logical height of the application
Application:getLogicalScaleX returns the scaling of automatic screen scaling on the x-axis
Application:getLogicalScaleY returns the scaling of automatic screen scaling on the y-axis
Application:getLogicalTranslateX returns the translation of automatic screen scaling on the x-axis
Application:getLogicalTranslateY returns the translation of automatic screen scaling on the y-axis
Application:getLogicalWidth returns the logical width of the application
Application:getOrientation returns the orientation of the application
Application:getScaleMode returns the automatic scale mode of the application
Application:getScreenDensity returns the screen density in pixels per inch
Application:getTextureMemoryUsage returns the texture memory usage in Kbytes
Application:isPlayerMode Check if app runs on player
Application:openUrl opens the given URL in the appropriate application
Application:setBackgroundColor sets the background color in hexadecimal format
Application:setFps sets the frame rate of the application
Application:setFullScreen Full screen or window mode
Application:setKeepAwake enables/disables screen dimming and device sleeping
Application:setKeyboardVisibility
Application:setLogicalDimensions sets the logical dimensions of the application
Application:setOrientation sets the orientation of the application
Application:setScaleMode sets the automatic scale mode of the application
Application:setWindowSize Sets desktop window to a specific size
Application:vibrate vibrates the device

Events

Constants

Application.LANDSCAPE_LEFT
Application.LANDSCAPE_RIGHT
Application.PORTRAIT
Application.PORTRAIT_UPSIDE_DOWN