Difference between revisions of "Application"

From GiderosMobile
Line 4: Line 4:
 
=== Description ===
 
=== Description ===
 
<translate><br />
 
<translate><br />
[[Application]] class contains the common functions that&#039;s available to the current application. There is a global variable [[application]] of type [[Application]] to access these functions.<br />
+
[[Special:MyLanguage/Application|Application]] class contains the common functions that&#039;s available to the current application. There is a global variable [[Special:MyLanguage/application|application]] of type [[Special:MyLanguage/Application|Application]] to access these functions.<br />
 
<br /></translate>
 
<br /></translate>
 
{|-
 
{|-
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== Methods ===
 
=== Methods ===
[[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/>
[[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/>
[[Application:exit]] ''<translate>Application - terminates the application</translate>''<br/>
+
[[Special:MyLanguage/Application:exit|Application:exit]] ''<translate>Application - terminates the application</translate>''<br/>
[[Application:getApiVersion]] ''<translate>Application - returns the API version</translate>''<br/>
+
[[Special:MyLanguage/Application:getApiVersion|Application:getApiVersion]] ''<translate>Application - returns the API version</translate>''<br/>
[[Application:getAppId]] ''<translate>Application - returns the app id or bundle id</translate>''<br/>
+
[[Special:MyLanguage/Application:getAppId|Application:getAppId]] ''<translate>Application - returns the app id or bundle id</translate>''<br/>
[[Application:getBackgroundColor]] ''<translate>Application - returns the background color in hexadecimal format</translate>''<br/>
+
[[Special:MyLanguage/Application:getBackgroundColor|Application:getBackgroundColor]] ''<translate>Application - returns the background color in hexadecimal format</translate>''<br/>
[[Application:getContentHeight]] ''<translate>Application - returns content height</translate>''<br/>
+
[[Special:MyLanguage/Application:getContentHeight|Application:getContentHeight]] ''<translate>Application - returns content height</translate>''<br/>
[[Application:getContentWidth]] ''<translate>Application - returns content width</translate>''<br/>
+
[[Special:MyLanguage/Application:getContentWidth|Application:getContentWidth]] ''<translate>Application - returns content width</translate>''<br/>
[[Application:getDeviceHeight]] ''<translate>Application - returns the physical height of the device in pixels</translate>''<br/>
+
[[Special:MyLanguage/Application:getDeviceHeight|Application:getDeviceHeight]] ''<translate>Application - returns the physical height of the device in pixels</translate>''<br/>
[[Application:getDeviceInfo]] ''<translate>Application - returns information about device</translate>''<br/>
+
[[Special:MyLanguage/Application:getDeviceInfo|Application:getDeviceInfo]] ''<translate>Application - returns information about device</translate>''<br/>
[[Application:getDeviceOrientation]] ''<translate>Get the device orientation</translate>''<br/>
+
[[Special:MyLanguage/Application:getDeviceOrientation|Application:getDeviceOrientation]] ''<translate>Get the device orientation</translate>''<br/>
[[Application:getDeviceSafeArea]] ''<translate>Application - returns the safe display area bounds</translate>''<br/>
+
[[Special:MyLanguage/Application:getDeviceSafeArea|Application:getDeviceSafeArea]] ''<translate>Application - returns the safe display area bounds</translate>''<br/>
[[Application:getDeviceWidth]] ''<translate>Application - returns the physical width of the device in pixels</translate>''<br/>
+
[[Special:MyLanguage/Application:getDeviceWidth|Application:getDeviceWidth]] ''<translate>Application - returns the physical width of the device in pixels</translate>''<br/>
[[Application:getFps]] ''<translate>Application - returns the frame rate of the application</translate>''<br/>
+
[[Special:MyLanguage/Application:getFps|Application:getFps]] ''<translate>Application - returns the frame rate of the application</translate>''<br/>
[[Application:getLanguage]] ''<translate>Application - returns the user language</translate>''<br/>
+
[[Special:MyLanguage/Application:getLanguage|Application:getLanguage]] ''<translate>Application - returns the user language</translate>''<br/>
[[Application:getLocale]] ''<translate>Application - returns the device locale</translate>''<br/>
+
[[Special:MyLanguage/Application:getLocale|Application:getLocale]] ''<translate>Application - returns the device locale</translate>''<br/>
[[Application:getLogicalBounds]] ''<translate>Application - returns the physical screen bounds in logical space</translate>''<br/>
+
[[Special:MyLanguage/Application:getLogicalBounds|Application:getLogicalBounds]] ''<translate>Application - returns the physical screen bounds in logical space</translate>''<br/>
[[Application:getLogicalHeight]] ''<translate>Application - returns the logical height of the application</translate>''<br/>
+
[[Special:MyLanguage/Application:getLogicalHeight|Application:getLogicalHeight]] ''<translate>Application - returns the logical height of the application</translate>''<br/>
[[Application:getLogicalScaleX]] ''<translate>Application - returns the scaling of automatic screen scaling on the x-axis</translate>''<br/>
+
[[Special:MyLanguage/Application:getLogicalScaleX|Application:getLogicalScaleX]] ''<translate>Application - returns the scaling of automatic screen scaling on the x-axis</translate>''<br/>
[[Application:getLogicalScaleY]] ''<translate>Application - returns the scaling of automatic screen scaling on the y-axis</translate>''<br/>
+
[[Special:MyLanguage/Application:getLogicalScaleY|Application:getLogicalScaleY]] ''<translate>Application - returns the scaling of automatic screen scaling on the y-axis</translate>''<br/>
[[Application:getLogicalTranslateX]] ''<translate>Application - returns the translation of automatic screen scaling on the x-axis</translate>''<br/>
+
[[Special:MyLanguage/Application:getLogicalTranslateX|Application:getLogicalTranslateX]] ''<translate>Application - returns the translation of automatic screen scaling on the x-axis</translate>''<br/>
[[Application:getLogicalTranslateY]] ''<translate>Application - returns the translation of automatic screen scaling on the y-axis</translate>''<br/>
+
[[Special:MyLanguage/Application:getLogicalTranslateY|Application:getLogicalTranslateY]] ''<translate>Application - returns the translation of automatic screen scaling on the y-axis</translate>''<br/>
[[Application:getLogicalWidth]] ''<translate>Application - returns the logical width of the application</translate>''<br/>
+
[[Special:MyLanguage/Application:getLogicalWidth|Application:getLogicalWidth]] ''<translate>Application - returns the logical width of the application</translate>''<br/>
[[Application:getOrientation]] ''<translate>Application - returns the orientation of the application</translate>''<br/>
+
[[Special:MyLanguage/Application:getOrientation|Application:getOrientation]] ''<translate>Application - returns the orientation of the application</translate>''<br/>
[[Application:getScaleMode]] ''<translate>Application - returns the automatic scale mode of the application</translate>''<br/>
+
[[Special:MyLanguage/Application:getScaleMode|Application:getScaleMode]] ''<translate>Application - returns the automatic scale mode of the application</translate>''<br/>
[[Application:getScreenDensity]] ''<translate>Application - returns the screen density in pixels per inch</translate>''<br/>
+
[[Special:MyLanguage/Application:getScreenDensity|Application:getScreenDensity]] ''<translate>Application - returns the screen density in pixels per inch</translate>''<br/>
[[Application:getTextureMemoryUsage]] ''<translate>Application - returns the texture memory usage in Kbytes</translate>''<br/>
+
[[Special:MyLanguage/Application:getTextureMemoryUsage|Application:getTextureMemoryUsage]] ''<translate>Application - returns the texture memory usage in Kbytes</translate>''<br/>
[[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/>
[[Application:openUrl]] ''<translate>Application - opens the given URL in the appropriate application</translate>''<br/>
+
[[Special:MyLanguage/Application:openUrl|Application:openUrl]] ''<translate>Application - opens the given URL in the appropriate application</translate>''<br/>
[[Application:setBackgroundColor]] ''<translate>Application - sets the background color in hexadecimal format</translate>''<br/>
+
[[Special:MyLanguage/Application:setBackgroundColor|Application:setBackgroundColor]] ''<translate>Application - sets the background color in hexadecimal format</translate>''<br/>
[[Application:setFps]] ''<translate>Application - sets the frame rate of the application</translate>''<br/>
+
[[Special:MyLanguage/Application:setFps|Application:setFps]] ''<translate>Application - sets the frame rate of the application</translate>''<br/>
[[Application:setFullScreen]] ''<translate>Full screen or window mode</translate>''<br/>
+
[[Special:MyLanguage/Application:setFullScreen|Application:setFullScreen]] ''<translate>Full screen or window mode</translate>''<br/>
[[Application:setKeepAwake]] ''<translate>Application - enables/disables screen dimming and device sleeping</translate>''<br/>
+
[[Special:MyLanguage/Application:setKeepAwake|Application:setKeepAwake]] ''<translate>Application - enables/disables screen dimming and device sleeping</translate>''<br/>
[[Application:setKeyboardVisibility]] <br/>
+
[[Special:MyLanguage/Application:setKeyboardVisibility|Application:setKeyboardVisibility]] <br/>
[[Application:setLogicalDimensions]] ''<translate>Application - sets the logical dimensions of the application</translate>''<br/>
+
[[Special:MyLanguage/Application:setLogicalDimensions|Application:setLogicalDimensions]] ''<translate>Application - sets the logical dimensions of the application</translate>''<br/>
[[Application:setOrientation]] ''<translate>Application - sets the orientation of the application</translate>''<br/>
+
[[Special:MyLanguage/Application:setOrientation|Application:setOrientation]] ''<translate>Application - sets the orientation of the application</translate>''<br/>
[[Application:setScaleMode]] ''<translate>Application - sets the automatic scale mode of the application</translate>''<br/>
+
[[Special:MyLanguage/Application:setScaleMode|Application:setScaleMode]] ''<translate>Application - sets the automatic scale mode of the application</translate>''<br/>
[[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/>
[[Application:vibrate]] ''<translate>Application - vibrates the device</translate>''<br/>
+
[[Special:MyLanguage/Application:vibrate|Application:vibrate]] ''<translate>Application - vibrates the device</translate>''<br/>
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== Events ===
 
=== Events ===
 
=== Constants ===
 
=== Constants ===
[[Application.LANDSCAPE_LEFT]]<br/>
+
[[Special:MyLanguage/Application.LANDSCAPE_LEFT|Application.LANDSCAPE_LEFT]]<br/>
[[Application.LANDSCAPE_RIGHT]]<br/>
+
[[Special:MyLanguage/Application.LANDSCAPE_RIGHT|Application.LANDSCAPE_RIGHT]]<br/>
[[Application.PORTRAIT]]<br/>
+
[[Special:MyLanguage/Application.PORTRAIT|Application.PORTRAIT]]<br/>
[[Application.PORTRAIT_UPSIDE_DOWN]]<br/>
+
[[Special:MyLanguage/Application.PORTRAIT_UPSIDE_DOWN|Application.PORTRAIT_UPSIDE_DOWN]]<br/>
 
|}
 
|}

Revision as of 17:34, 23 August 2018

Supported platforms: android, ios, mac, pc
Available since: Gideros 2011.6

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

Events

Constants

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