Difference between revisions of "Application"

From GiderosMobile
(Undo revision 13747 by MoKaLux (talk))
Tag: Undo
(Undo revision 13641 by MoKaLux (talk))
Tag: Undo
Line 5: Line 5:
 
'''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/>
 
'''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
'''Inherits from:''' [[Object]]<br/>
+
'''Inherits from:''' [[Special:MyLanguage/Object|Object]]<br/>
  
 
=== Description ===
 
=== 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.
+
[[Special:MyLanguage/Application|Application]] class contains the common functions that's available to the current application. There is a global variable ''application'' of type [[Special:MyLanguage/Application|Application]] to access these functions.
 
<br />
 
<br />
 
<br />
 
<br />
Line 16: Line 16:
  
 
=== Methods ===
 
=== Methods ===
[[Application:canOpenUrl]] ''Tests if it is possible to open provided url''<br/>
+
[[Special:MyLanguage/Application:canOpenUrl|Application:canOpenUrl]] ''Tests if it is possible to open provided url''<br/>
[[Application:configureFrustum]] ''Configure the projection for 3D perspective.''<br/>
+
[[Special:MyLanguage/Application:configureFrustum|Application:configureFrustum]] ''Configure the projection for 3D perspective.''<br/>
[[Application:exit]] ''terminates the application''<br/>
+
[[Special:MyLanguage/Application:exit|Application:exit]] ''terminates the application''<br/>
[[Application:get]] ''returns state of desktop setting''<br/>
+
[[Special:MyLanguage/Application:get|Application:get]] ''returns state of desktop setting''<br/>
[[Application:getApiVersion]] ''returns the API version''<br/>
+
[[Special:MyLanguage/Application:getApiVersion|Application:getApiVersion]] ''returns the API version''<br/>
[[Application:getAppId]] ''returns the app id or bundle id''<br/>
+
[[Special:MyLanguage/Application:getAppId|Application:getAppId]] ''returns the app id or bundle id''<br/>
[[Application:getBackgroundColor]] ''returns the background color in hexadecimal format''<br/>
+
[[Special:MyLanguage/Application:getBackgroundColor|Application:getBackgroundColor]] ''returns the background color in hexadecimal format''<br/>
[[Application:getContentHeight]] ''returns content height''<br/>
+
[[Special:MyLanguage/Application:getContentHeight|Application:getContentHeight]] ''returns content height''<br/>
[[Application:getContentWidth]] ''returns content width''<br/>
+
[[Special:MyLanguage/Application:getContentWidth|Application:getContentWidth]] ''returns content width''<br/>
[[Application:getDeviceHeight]] ''returns the physical height of the device in pixels''<br/>
+
[[Special:MyLanguage/Application:getDeviceHeight|Application:getDeviceHeight]] ''returns the physical height of the device in pixels''<br/>
[[Application:getDeviceWidth]] ''returns the physical width of the device in pixels''<br/>
+
[[Special:MyLanguage/Application:getDeviceWidth|Application:getDeviceWidth]] ''returns the physical width of the device in pixels''<br/>
[[Application:getDeviceInfo]] ''returns information about device''<br/>
+
[[Special:MyLanguage/Application:getDeviceInfo|Application:getDeviceInfo]] ''returns information about device''<br/>
[[Application:getDeviceOrientation]] ''Get the device orientation''<br/>
+
[[Special:MyLanguage/Application:getDeviceOrientation|Application:getDeviceOrientation]] ''Get the device orientation''<br/>
[[Application:getDeviceSafeArea]] ''returns the safe display area bounds''<br/>
+
[[Special:MyLanguage/Application:getDeviceSafeArea|Application:getDeviceSafeArea]] ''returns the safe display area bounds''<br/>
[[Application:getFps]] ''returns the frame rate of the application''<br/>
+
[[Special:MyLanguage/Application:getFps|Application:getFps]] ''returns the frame rate of the application''<br/>
[[Application:getKeyboardModifiers]] ''returns the current keyboard modifiers''<br/>
+
[[Special:MyLanguage/Application:getKeyboardModifiers|Application:getKeyboardModifiers]] ''returns the current keyboard modifiers''<br/>
[[Application:getLanguage]] ''returns the user language''<br/>
+
[[Special:MyLanguage/Application:getLanguage|Application:getLanguage]] ''returns the user language''<br/>
[[Application:getLocale]] ''returns the device locale''<br/>
+
[[Special:MyLanguage/Application:getLocale|Application:getLocale]] ''returns the device locale''<br/>
[[Application:getLogicalBounds]] ''returns the physical screen bounds in logical space''<br/>
+
[[Special:MyLanguage/Application:getLogicalBounds|Application:getLogicalBounds]] ''returns the physical screen bounds in logical space''<br/>
[[Application:getLogicalHeight]] ''returns the logical height of the application''<br/>
+
[[Special:MyLanguage/Application:getLogicalHeight|Application:getLogicalHeight]] ''returns the logical height of the application''<br/>
[[Application:getLogicalWidth]] ''returns the logical width of the application''<br/>
+
[[Special:MyLanguage/Application:getLogicalWidth|Application:getLogicalWidth]] ''returns the logical width of the application''<br/>
[[Application:getLogicalScaleX]] ''returns the scaling of automatic screen scaling on the x-axis''<br/>
+
[[Special:MyLanguage/Application:getLogicalScaleX|Application:getLogicalScaleX]] ''returns the scaling of automatic screen scaling on the x-axis''<br/>
[[Application:getLogicalScaleY]] ''returns the scaling of automatic screen scaling on the y-axis''<br/>
+
[[Special:MyLanguage/Application:getLogicalScaleY|Application:getLogicalScaleY]] ''returns the scaling of automatic screen scaling on the y-axis''<br/>
[[Application:getLogicalTranslateX]] ''returns the translation of automatic screen scaling on the x-axis''<br/>
+
[[Special:MyLanguage/Application:getLogicalTranslateX|Application:getLogicalTranslateX]] ''returns the translation of automatic screen scaling on the x-axis''<br/>
[[Application:getLogicalTranslateY]] ''returns the translation of automatic screen scaling on the y-axis''<br/>
+
[[Special:MyLanguage/Application:getLogicalTranslateY|Application:getLogicalTranslateY]] ''returns the translation of automatic screen scaling on the y-axis''<br/>
[[Application:getOrientation]] ''returns the orientation of the application''<br/>
+
[[Special:MyLanguage/Application:getOrientation|Application:getOrientation]] ''returns the orientation of the application''<br/>
[[Application:getScaleMode]] ''returns the automatic scale mode of the application''<br/>
+
[[Special:MyLanguage/Application:getScaleMode|Application:getScaleMode]] ''returns the automatic scale mode of the application''<br/>
[[Application:getScreenDensity]] ''returns the screen density in pixels per inch''<br/>
+
[[Special:MyLanguage/Application:getScreenDensity|Application:getScreenDensity]] ''returns the screen density in pixels per inch''<br/>
[[Application:getTextureMemoryUsage]] ''returns the texture memory usage in Kbytes''<br/>
+
[[Special:MyLanguage/Application:getTextureMemoryUsage|Application:getTextureMemoryUsage]] ''returns the texture memory usage in Kbytes''<br/>
[[Application:isPlayerMode]] ''Check if app runs on player''<br/>
+
[[Special:MyLanguage/Application:isPlayerMode|Application:isPlayerMode]] ''Check if app runs on player''<br/>
[[Application:openUrl]] ''opens the given URL in the appropriate application''<br/>
+
[[Special:MyLanguage/Application:openUrl|Application:openUrl]] ''opens the given URL in the appropriate application''<br/>
[[Application:set]] ''sets state of desktop settings''<br/>
+
[[Special:MyLanguage/Application:set|Application:set]] ''sets state of desktop settings''<br/>
[[Application:setBackgroundColor]] ''sets the background color in hexadecimal format''<br/>
+
[[Special:MyLanguage/Application:setBackgroundColor|Application:setBackgroundColor]] ''sets the background color in hexadecimal format''<br/>
[[Application:setFps]] ''sets the frame rate of the application''<br/>
+
[[Special:MyLanguage/Application:setFps|Application:setFps]] ''sets the frame rate of the application''<br/>
[[Application:setFullScreen]] ''Full screen or window mode''<br/>
+
[[Special:MyLanguage/Application:setFullScreen|Application:setFullScreen]] ''Full screen or window mode''<br/>
[[Application:setKeepAwake]] ''enables/disables screen dimming and device sleeping''<br/>
+
[[Special:MyLanguage/Application:setKeepAwake|Application:setKeepAwake]] ''enables/disables screen dimming and device sleeping''<br/>
[[Application:setKeyboardVisibility]] <br/>
+
[[Special:MyLanguage/Application:setKeyboardVisibility|Application:setKeyboardVisibility]] <br/>
[[Application:setLogicalDimensions]] ''sets the logical dimensions of the application''<br/>
+
[[Special:MyLanguage/Application:setLogicalDimensions|Application:setLogicalDimensions]] ''sets the logical dimensions of the application''<br/>
[[Application:setOrientation]] ''sets the orientation of the application''<br/>
+
[[Special:MyLanguage/Application:setOrientation|Application:setOrientation]] ''sets the orientation of the application''<br/>
[[Application:setScaleMode]] ''sets the automatic scale mode of the application''<br/>
+
[[Special:MyLanguage/Application:setScaleMode|Application:setScaleMode]] ''sets the automatic scale mode of the application''<br/>
[[Application:setWindowSize]] ''Sets desktop window to a specific size''<br/>
+
[[Special:MyLanguage/Application:setWindowSize|Application:setWindowSize]] ''Sets desktop window to a specific size''<br/>
[[Application:vibrate]] ''vibrates the device''<br/>
+
[[Special:MyLanguage/Application:vibrate|Application:vibrate]] ''vibrates the device''<br/>
  
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
  
 
=== Events ===
 
=== Events ===
[[Event.APPLICATION_START]]<br/>  
+
[[Special:MyLanguage/Event.APPLICATION_START|Event.APPLICATION_START]]<br/>  
[[Event.APPLICATION_RESIZE]]<br/>  
+
[[Special:MyLanguage/Event.APPLICATION_RESIZE|Event.APPLICATION_RESIZE]]<br/>  
<!-- You must delete this page [[APPLICATION_RESIZE]]<br/> -->
+
[[Special:MyLanguage/Event.APPLICATION_SUSPEND|Event.APPLICATION_SUSPEND]]<br/>  
[[Event.APPLICATION_SUSPEND]]<br/>  
+
[[Special:MyLanguage/Event.APPLICATION_EXIT|Event.APPLICATION_EXIT]]<br/>  
[[Event.APPLICATION_EXIT]]<br/>  
+
[[Special:MyLanguage/Event.APPLICATION_RESUME|Event.APPLICATION_RESUME]]<br/>
[[Event.APPLICATION_RESUME]]<br/>
+
------------------------------------------------------
 +
You must delete this page [[APPLICATION_RESIZE]]<br/>
  
 
=== Constants ===
 
=== Constants ===
[[Application.LANDSCAPE_LEFT]]<br/><!-- GIDEROSCST:Application.LANDSCAPE_LEFT landscapeLeft-->
+
[[Special:MyLanguage/Application.LANDSCAPE_LEFT|Application.LANDSCAPE_LEFT]]<br/><!-- GIDEROSCST:Application.LANDSCAPE_LEFT landscapeLeft-->
[[Application.LANDSCAPE_RIGHT]]<br/><!-- GIDEROSCST:Application.LANDSCAPE_RIGHT landscapeRight-->
+
[[Special:MyLanguage/Application.LANDSCAPE_RIGHT|Application.LANDSCAPE_RIGHT]]<br/><!-- GIDEROSCST:Application.LANDSCAPE_RIGHT landscapeRight-->
[[Application.PORTRAIT]]<br/><!-- GIDEROSCST:Application.PORTRAIT portrait-->
+
[[Special:MyLanguage/Application.PORTRAIT|Application.PORTRAIT]]<br/><!-- GIDEROSCST:Application.PORTRAIT portrait-->
[[Application.PORTRAIT_UPSIDE_DOWN]]<br/><!-- GIDEROSCST:Application.PORTRAIT_UPSIDE_DOWN portraitUpsideDown-->
+
[[Special:MyLanguage/Application.PORTRAIT_UPSIDE_DOWN|Application.PORTRAIT_UPSIDE_DOWN]]<br/><!-- GIDEROSCST:Application.PORTRAIT_UPSIDE_DOWN portraitUpsideDown-->
  
 
|}
 
|}
 
+
<br/>
----
 
  
 
{{Special:PrefixIndex/Application}}
 
{{Special:PrefixIndex/Application}}

Revision as of 11:00, 4 December 2019


Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.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:get returns state of desktop setting
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:getDeviceWidth returns the physical width 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:getFps returns the frame rate of the application
Application:getKeyboardModifiers returns the current keyboard modifiers
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:getLogicalWidth returns the logical width 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: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:set sets state of desktop settings
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

Event.APPLICATION_START
Event.APPLICATION_RESIZE
Event.APPLICATION_SUSPEND
Event.APPLICATION_EXIT
Event.APPLICATION_RESUME


You must delete this page APPLICATION_RESIZE

Constants

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