Difference between revisions of "Application"

From GiderosMobile
Line 22: Line 22:
 
[[Special:MyLanguage/Application:getContentWidth|Application:getContentWidth]] ''<translate>returns content width</translate>''<br/><!-- GIDEROSMTD:Application:getContentWidth() returns content width -->
 
[[Special:MyLanguage/Application:getContentWidth|Application:getContentWidth]] ''<translate>returns content width</translate>''<br/><!-- GIDEROSMTD:Application:getContentWidth() returns content width -->
 
[[Special:MyLanguage/Application:getDeviceHeight|Application:getDeviceHeight]] ''<translate>returns the physical height of the device in pixels</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceHeight() returns the physical height of the device in pixels -->
 
[[Special:MyLanguage/Application:getDeviceHeight|Application:getDeviceHeight]] ''<translate>returns the physical height of the device in pixels</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceHeight() returns the physical height of the device in pixels -->
 +
[[Special:MyLanguage/Application:getDeviceWidth|Application:getDeviceWidth]] ''<translate>returns the physical width of the device in pixels</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceWidth() returns the physical width of the device in pixels -->
 
[[Special:MyLanguage/Application:getDeviceInfo|Application:getDeviceInfo]] ''<translate>returns information about device</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceInfo() returns information about device -->
 
[[Special:MyLanguage/Application:getDeviceInfo|Application:getDeviceInfo]] ''<translate>returns information about device</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceInfo() returns information about device -->
 
[[Special:MyLanguage/Application:getDeviceOrientation|Application:getDeviceOrientation]] ''<translate>Get the device orientation</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceOrientation() Get the device orientation -->
 
[[Special:MyLanguage/Application:getDeviceOrientation|Application:getDeviceOrientation]] ''<translate>Get the device orientation</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceOrientation() Get the device orientation -->
 
[[Special:MyLanguage/Application:getDeviceSafeArea|Application:getDeviceSafeArea]] ''<translate>returns the safe display area bounds</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceSafeArea(logical) returns the safe display area bounds -->
 
[[Special:MyLanguage/Application:getDeviceSafeArea|Application:getDeviceSafeArea]] ''<translate>returns the safe display area bounds</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceSafeArea(logical) returns the safe display area bounds -->
[[Special:MyLanguage/Application:getDeviceWidth|Application:getDeviceWidth]] ''<translate>returns the physical width of the device in pixels</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceWidth() returns the physical width of the device in pixels -->
+
 
 
[[Special:MyLanguage/Application:getFps|Application:getFps]] ''<translate>returns the frame rate of the application</translate>''<br/><!-- GIDEROSMTD:Application:getFps() returns the frame rate of the application -->
 
[[Special:MyLanguage/Application:getFps|Application:getFps]] ''<translate>returns the frame rate of the application</translate>''<br/><!-- GIDEROSMTD:Application:getFps() returns the frame rate of the application -->
 
[[Special:MyLanguage/Application:getKeyboardModifiers|Application:getKeyboardModifiers]] ''<translate>returns the current keyboard modifiers</translate>''<br/><!-- GIDEROSMTD:Application:getKeyboardModifiers() returns the current keyboard modifiers -->
 
[[Special:MyLanguage/Application:getKeyboardModifiers|Application:getKeyboardModifiers]] ''<translate>returns the current keyboard modifiers</translate>''<br/><!-- GIDEROSMTD:Application:getKeyboardModifiers() returns the current keyboard modifiers -->
Line 32: Line 33:
 
[[Special:MyLanguage/Application:getLogicalBounds|Application:getLogicalBounds]] ''<translate>returns the physical screen bounds in logical space</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalBounds() returns the physical screen bounds in logical space -->
 
[[Special:MyLanguage/Application:getLogicalBounds|Application:getLogicalBounds]] ''<translate>returns the physical screen bounds in logical space</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalBounds() returns the physical screen bounds in logical space -->
 
[[Special:MyLanguage/Application:getLogicalHeight|Application:getLogicalHeight]] ''<translate>returns the logical height of the application</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalHeight() returns the logical height of the application -->
 
[[Special:MyLanguage/Application:getLogicalHeight|Application:getLogicalHeight]] ''<translate>returns the logical height of the application</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalHeight() returns the logical height of the application -->
 +
[[Special:MyLanguage/Application:getLogicalWidth|Application:getLogicalWidth]] ''<translate>returns the logical width of the application</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalWidth() returns the logical width of the application -->
 
[[Special:MyLanguage/Application:getLogicalScaleX|Application:getLogicalScaleX]] ''<translate>returns the scaling of automatic screen scaling on the x-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalScaleX() returns the scaling of automatic screen scaling on the x-axis -->
 
[[Special:MyLanguage/Application:getLogicalScaleX|Application:getLogicalScaleX]] ''<translate>returns the scaling of automatic screen scaling on the x-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalScaleX() returns the scaling of automatic screen scaling on the x-axis -->
 
[[Special:MyLanguage/Application:getLogicalScaleY|Application:getLogicalScaleY]] ''<translate>returns the scaling of automatic screen scaling on the y-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalScaleY() returns the scaling of automatic screen scaling on the y-axis -->
 
[[Special:MyLanguage/Application:getLogicalScaleY|Application:getLogicalScaleY]] ''<translate>returns the scaling of automatic screen scaling on the y-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalScaleY() returns the scaling of automatic screen scaling on the y-axis -->
 
[[Special:MyLanguage/Application:getLogicalTranslateX|Application:getLogicalTranslateX]] ''<translate>returns the translation of automatic screen scaling on the x-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalTranslateX() returns the translation of automatic screen scaling on the x-axis -->
 
[[Special:MyLanguage/Application:getLogicalTranslateX|Application:getLogicalTranslateX]] ''<translate>returns the translation of automatic screen scaling on the x-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalTranslateX() returns the translation of automatic screen scaling on the x-axis -->
 
[[Special:MyLanguage/Application:getLogicalTranslateY|Application:getLogicalTranslateY]] ''<translate>returns the translation of automatic screen scaling on the y-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalTranslateY() returns the translation of automatic screen scaling on the y-axis -->
 
[[Special:MyLanguage/Application:getLogicalTranslateY|Application:getLogicalTranslateY]] ''<translate>returns the translation of automatic screen scaling on the y-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalTranslateY() returns the translation of automatic screen scaling on the y-axis -->
[[Special:MyLanguage/Application:getLogicalWidth|Application:getLogicalWidth]] ''<translate>returns the logical width of the application</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalWidth() returns the logical width of the application -->
+
 
 
[[Special:MyLanguage/Application:getOrientation|Application:getOrientation]] ''<translate>returns the orientation of the application</translate>''<br/><!-- GIDEROSMTD:Application:getOrientation() returns the orientation of the application -->
 
[[Special:MyLanguage/Application:getOrientation|Application:getOrientation]] ''<translate>returns the orientation of the application</translate>''<br/><!-- GIDEROSMTD:Application:getOrientation() returns the orientation of the application -->
 
[[Special:MyLanguage/Application:getScaleMode|Application:getScaleMode]] ''<translate>returns the automatic scale mode of the application</translate>''<br/><!-- GIDEROSMTD:Application:getScaleMode() returns the automatic scale mode of the application -->
 
[[Special:MyLanguage/Application:getScaleMode|Application:getScaleMode]] ''<translate>returns the automatic scale mode of the application</translate>''<br/><!-- GIDEROSMTD:Application:getScaleMode() returns the automatic scale mode of the application -->
Line 54: Line 56:
 
[[Special:MyLanguage/Application:setWindowSize|Application:setWindowSize]] ''<translate>Sets desktop window to a specific size</translate>''<br/><!-- GIDEROSMTD:Application:setWindowSize(width,height) Sets desktop window to a specific size -->
 
[[Special:MyLanguage/Application:setWindowSize|Application:setWindowSize]] ''<translate>Sets desktop window to a specific size</translate>''<br/><!-- GIDEROSMTD:Application:setWindowSize(width,height) Sets desktop window to a specific size -->
 
[[Special:MyLanguage/Application:vibrate|Application:vibrate]] ''<translate>vibrates the device</translate>''<br/><!-- GIDEROSMTD:Application:vibrate(ms) vibrates the device -->
 
[[Special:MyLanguage/Application:vibrate|Application:vibrate]] ''<translate>vibrates the device</translate>''<br/><!-- GIDEROSMTD:Application:vibrate(ms) vibrates the device -->
| style="width: 50%; vertical-align:top;"|
 
  
 
=== <translate>Events</translate> ===
 
=== <translate>Events</translate> ===

Revision as of 07:51, 21 July 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

APPLICATION_RESIZE

Constants

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