Difference between revisions of "Application"

From GiderosMobile
 
(26 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
 
 
<!-- GIDEROSOBJ:Application -->
 
<!-- GIDEROSOBJ:Application -->
'''<translate>Supported platforms</translate>:''' [[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]][[File:Platform linux.png]]<br/>
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
+
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/>
+
'''Inherits from:''' [[Object|Object]]<br/>
=== <translate>Description</translate> ===
+
 
<translate><br />
+
=== Description ===
[[Special:MyLanguage/Application|Application]] class contains the common functions that&#039;s available to the current application. There is a global variable ''application'' of type [[Special:MyLanguage/Application|Application]] to access these functions.<br />
+
The Application class contains the common functions that are available to the current application.
<br /></translate>
+
 
 +
There is a global variable '''''application''''' of type Application to access these functions.
 +
 
 
{|-
 
{|-
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
=== <translate>Methods</translate> ===
+
=== Methods ===
[[Special:MyLanguage/Application:canOpenUrl|Application:canOpenUrl]] ''<translate>Tests if it is possible to open provided url</translate>''<br/><!-- GIDEROSMTD:Application:canOpenUrl(url) Tests if it is possible to open provided url -->
+
[[Application:canOpenUrl]] ''tests if it is possible to open provided url''<br/><!--GIDEROSMTD:Application:canOpenUrl(url) tests if it is possible to open provided url -->
[[Special:MyLanguage/Application:configureFrustum|Application:configureFrustum]] ''<translate>Configure the projection for 3D perspective.</translate>''<br/><!-- GIDEROSMTD:Application:configureFrustum(fov,farplane) Configure the projection for 3D perspective. -->
+
[[Application:checkPermission]] ''checks android permission''<br/><!--GIDEROSMTD:Application:checkPermission(permission) checks android permission-->
[[Special:MyLanguage/Application:exit|Application:exit]] ''<translate>terminates the application</translate>''<br/><!-- GIDEROSMTD:Application:exit() terminates the application -->
+
[[Application:configureFrustum]] ''configures the projection for 3D perspective''<br/><!--GIDEROSMTD:Application:configureFrustum(fov,farplane) configures the projection for 3D perspective-->
[[Special:MyLanguage/Application:get|Application:get]] ''<translate>returns state of desktop setting</translate>''<br/><!-- GIDEROSMTD:Application:get(setting) returns state of desktop setting -->
+
[[Application:enableDrawInfo]] ''shows or hides Gideros info layer''<br/><!--GIDEROSMTD:Application:enableDrawInfo(color) shows or hides Gideros info layer-->
[[Special:MyLanguage/Application:getApiVersion|Application:getApiVersion]] ''<translate>returns the API version</translate>''<br/><!-- GIDEROSMTD:Application:getApiVersion() returns the API version -->
+
[[Application:enableOnDemandDraw]] ''enable or disable on-demand rendering''<br/><!--GIDEROSMTD:Application:enableOnDemandDraw(enable) enable or disable on-demand rendering-->
[[Special:MyLanguage/Application:getAppId|Application:getAppId]] ''<translate>returns the app id or bundle id</translate>''<br/><!-- GIDEROSMTD:Application:getAppId() returns the app id or bundle id -->
+
[[Application:exit]] ''terminates the application''<br/><!--GIDEROSMTD:Application:exit() terminates the application-->
[[Special:MyLanguage/Application:getBackgroundColor|Application:getBackgroundColor]] ''<translate>returns the background color in hexadecimal format</translate>''<br/><!-- GIDEROSMTD:Application:getBackgroundColor() returns the background color in hexadecimal format -->
+
[[Application:get]] ''returns state of desktop setting''<br/><!--GIDEROSMTD:Application:get(setting) returns state of desktop setting-->
[[Special:MyLanguage/Application:getContentHeight|Application:getContentHeight]] ''<translate>returns content height</translate>''<br/><!-- GIDEROSMTD:Application:getContentHeight() returns content height -->
+
[[Application:getApiVersion]] ''returns the API version''<br/><!--GIDEROSMTD:Application:getApiVersion() returns the API version-->
[[Special:MyLanguage/Application:getContentWidth|Application:getContentWidth]] ''<translate>returns content width</translate>''<br/><!-- GIDEROSMTD:Application:getContentWidth() returns content width -->
+
[[Application:getAppId]] ''returns the app id or bundle id''<br/><!--GIDEROSMTD:Application:getAppId() returns the app id or bundle id-->
[[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 -->
+
[[Application:getBackgroundColor]] ''returns the background color''<br/><!--GIDEROSMTD:Application:getBackgroundColor() returns the background color in hexadecimal format-->
[[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 -->
+
[[Application:getClipboard]] ''returns content of the clipboard''<br/><!--GIDEROSMTD:Application:getClipboard() returns content of the clipboard-->
[[Special:MyLanguage/Application:getDeviceInfo|Application:getDeviceInfo]] ''<translate>returns information about device</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceInfo() returns information about device -->
+
[[Application:getContentHeight]] ''returns content height''<br/><!--GIDEROSMTD:Application:getContentHeight() returns content height-->
[[Special:MyLanguage/Application:getDeviceOrientation|Application:getDeviceOrientation]] ''<translate>Get the device orientation</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceOrientation() Get the device orientation -->
+
[[Application:getContentWidth]] ''returns content width''<br/><!--GIDEROSMTD:Application:getContentWidth() returns content width-->
[[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 -->
+
[[Application:getDeviceHeight]] ''returns the physical height of the device''<br/><!--GIDEROSMTD:Application:getDeviceHeight() returns the physical height of the device in pixels-->
 +
[[Application:getDeviceWidth]] ''returns the physical width of the device''<br/><!--GIDEROSMTD:Application:getDeviceWidth() returns the physical width of the device in pixels-->
 +
[[Application:getDeviceInfo]] ''returns information about device''<br/><!--GIDEROSMTD:Application:getDeviceInfo() returns information about device-->
 +
[[Application:getDeviceName]] ''returns the device name''<br/><!--GIDEROSMTD:Application:getDeviceName() returns the device name-->
 +
[[Application:getDeviceOrientation]] ''gets the device orientation''<br/><!--GIDEROSMTD:Application:getDeviceOrientation() gets the device orientation-->
 +
[[Application:getDeviceSafeArea]] ''returns the safe display area bounds''<br/><!--GIDEROSMTD:Application:getDeviceSafeArea(logical) returns the safe display area bounds-->
 +
[[Application:getFps]] ''returns the frame rate of the application''<br/><!--GIDEROSMTD:Application:getFps() returns the frame rate of the application-->
 +
[[Application:getKeyboardModifiers]] ''returns the current keyboard modifiers''<br/><!--GIDEROSMTD:Application:getKeyboardModifiers() returns the current keyboard modifiers-->
 +
[[Application:getLanguage]] ''returns the user language''<br/><!--GIDEROSMTD:Application:getLanguage() returns the user language-->
 +
[[Application:getLocale]] ''returns the device locale''<br/><!--GIDEROSMTD:Application:getLocale() returns the device locale-->
 +
[[Application:getLogicalBounds]] ''returns the physical screen bounds in logical space''<br/><!--GIDEROSMTD:Application:getLogicalBounds() returns the physical screen bounds in logical space-->
 +
[[Application:getLogicalHeight]] ''returns the logical height of the application''<br/><!--GIDEROSMTD:Application:getLogicalHeight() returns the logical height of the application-->
 +
[[Application:getLogicalWidth]] ''returns the logical width of the application''<br/><!--GIDEROSMTD:Application:getLogicalWidth() returns the logical width of the application -->
 +
[[Application:getLogicalScaleX]] ''returns the scaling of automatic screen scaling on the x-axis''<br/><!--GIDEROSMTD: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''<br/><!--GIDEROSMTD: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''<br/><!--GIDEROSMTD: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''<br/><!--GIDEROSMTD:Application:getLogicalTranslateY() returns the translation of automatic screen scaling on the y-axis-->
 +
[[Application:getNativePath]] ''returns the system path for a given resource''<br/><!--GIDEROSMTD:Application:getNativePath(path) returns the system path for a given resource-->
 +
[[Application:getOrientation]] ''returns the orientation of the application''<br/><!--GIDEROSMTD:Application:getOrientation() returns the orientation of the application-->
 +
[[Application:getProjectProperties]] ''returns the project properties'' '''new'''<br/><!--GIDEROSMTD:Application:getProjectProperties() returns the project properties-->
 +
[[Application:getScaleMode]] ''returns the automatic scale mode of the application''<br/><!--GIDEROSMTD:Application:getScaleMode() returns the automatic scale mode of the application-->
 +
[[Application:getScreenDensity]] ''returns the screen density in pixels per inch''<br/><!--GIDEROSMTD:Application:getScreenDensity() returns the screen density in pixels per inch-->
 +
[[Application:getTextureMemoryUsage]] ''returns the texture memory usage in Kbytes''<br/><!--GIDEROSMTD:Application:getTextureMemoryUsage() returns the texture memory usage in Kbytes-->
 +
[[Application:isPlayerMode]] ''checks if app runs on player''<br/><!--GIDEROSMTD:Application:isPlayerMode() checks if app runs on player-->
 +
[[Application:openUrl]] ''opens the given URL in the appropriate application''<br/><!--GIDEROSMTD:Application:openUrl(url) opens the given URL in the appropriate application-->
 +
[[Application:requestPermissions]] ''requests an android permission''<br/><!--GIDEROSMTD:Application:requestPermissions({permissions}) requests one or more android permission(s)-->
 +
[[Application:set]] ''sets state of desktop settings''<br/><!--GIDEROSMTD:Application:set(setting, values) sets state of desktop settings-->
 +
[[Application:setBackgroundColor]] ''sets the background color''<br/><!--GIDEROSMTD:Application:setBackgroundColor(color) sets the background color in hexadecimal format-->
 +
[[Application:setClipboard]] ''stores data to the clipboard''<br/><!--GIDEROSMTD:Application:setClipboard(string) stores data to the clipboard-->
 +
[[Application:setEventMerging]] ''allows merging of touch/mouse move events''<br/><!--GIDEROSMTD:Application:setEventMerging(bool) allows merging of touch/mouse move events-->
 +
[[Application:setFps]] ''sets the frame rate of the application''<br/><!--GIDEROSMTD:Application:setFps(fps) sets the frame rate of the application-->
 +
[[Application:setFullScreen]] ''full screen or window mode''<br/><!--GIDEROSMTD:Application:setFullScreen(fullscreen) full screen or window mode-->
 +
[[Application:setKeepAwake]] ''enables/disables screen dimming and device sleeping''<br/><!--GIDEROSMTD:Application:setKeepAwake(keepAwake) enables/disables screen dimming and device sleeping-->
 +
[[Application:setKeyboardVisibility]] ''sets the keyboard visibility''<br/><!--GIDEROSMTD:Application:setKeyboardVisibility(visible) sets the keyboard visibility-->
 +
[[Application:setLogicalDimensions]] ''sets the logical dimensions of the application''<br/><!--GIDEROSMTD:Application:setLogicalDimensions(width,height) sets the logical dimensions of the application-->
 +
[[Application:setOrientation]] ''sets the orientation of the application''<br/><!--GIDEROSMTD:Application:setOrientation(orientation) sets the orientation of the application-->
 +
[[Application:setScaleMode]] ''sets the automatic scale mode of the application''<br/><!--GIDEROSMTD:Application:setScaleMode(scaleMode) sets the automatic scale mode of the application-->
 +
[[Application:setTextInput]] ''sets the IME of the android keyboard''<br/><!--GIDEROSMTD:Application:setTextInput(type,buffer,selstart,selend,label,actionLabel,hintText) sets the IME of the android keyboard-->
 +
[[Application:setWindowSize]] ''sets desktop window to a specific size''<br/><!--GIDEROSMTD:Application:setWindowSize(width,height) sets desktop window to a specific size-->
 +
[[Application:vibrate]] ''vibrates the device''<br/><!--GIDEROSMTD:Application:vibrate(ms) vibrates the device-->
  
[[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:getLanguage|Application:getLanguage]] ''<translate>returns the user language</translate>''<br/><!-- GIDEROSMTD:Application:getLanguage() returns the user language -->
 
[[Special:MyLanguage/Application:getLocale|Application:getLocale]] ''<translate>returns the device locale</translate>''<br/><!-- GIDEROSMTD:Application:getLocale() returns the device locale -->
 
[[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: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: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: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: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:getScreenDensity|Application:getScreenDensity]] ''<translate>returns the screen density in pixels per inch</translate>''<br/><!-- GIDEROSMTD:Application:getScreenDensity() returns the screen density in pixels per inch -->
 
[[Special:MyLanguage/Application:getTextureMemoryUsage|Application:getTextureMemoryUsage]] ''<translate>returns the texture memory usage in Kbytes</translate>''<br/><!-- GIDEROSMTD:Application:getTextureMemoryUsage() returns the texture memory usage in Kbytes -->
 
[[Special:MyLanguage/Application:isPlayerMode|Application:isPlayerMode]] ''<translate>Check if app runs on player</translate>''<br/><!-- GIDEROSMTD:Application:isPlayerMode() Check if app runs on player -->
 
[[Special:MyLanguage/Application:openUrl|Application:openUrl]] ''<translate>opens the given URL in the appropriate application</translate>''<br/><!-- GIDEROSMTD:Application:openUrl(url) opens the given URL in the appropriate application -->
 
[[Special:MyLanguage/Application:set|Application:set]] ''<translate>sets state of desktop settings</translate>''<br/><!-- GIDEROSMTD:Application:set(setting, values) Sets state of desktop settings -->
 
[[Special:MyLanguage/Application:setBackgroundColor|Application:setBackgroundColor]] ''<translate>sets the background color in hexadecimal format</translate>''<br/><!-- GIDEROSMTD:Application:setBackgroundColor(color) sets the background color in hexadecimal format -->
 
[[Special:MyLanguage/Application:setFps|Application:setFps]] ''<translate>sets the frame rate of the application</translate>''<br/><!-- GIDEROSMTD:Application:setFps(fps) sets the frame rate of the application -->
 
[[Special:MyLanguage/Application:setFullScreen|Application:setFullScreen]] ''<translate>Full screen or window mode</translate>''<br/><!-- GIDEROSMTD:Application:setFullScreen(fullscreen) Full screen or window mode -->
 
[[Special:MyLanguage/Application:setKeepAwake|Application:setKeepAwake]] ''<translate>enables/disables screen dimming and device sleeping</translate>''<br/><!-- GIDEROSMTD:Application:setKeepAwake(keepAwake) enables/disables screen dimming and device sleeping -->
 
[[Special:MyLanguage/Application:setKeyboardVisibility|Application:setKeyboardVisibility]] <br/><!-- GIDEROSMTD:Application:setKeyboardVisibility(visible)  -->
 
[[Special:MyLanguage/Application:setLogicalDimensions|Application:setLogicalDimensions]] ''<translate>sets the logical dimensions of the application</translate>''<br/><!-- GIDEROSMTD:Application:setLogicalDimensions(width,height) sets the logical dimensions of the application -->
 
[[Special:MyLanguage/Application:setOrientation|Application:setOrientation]] ''<translate>sets the orientation of the application</translate>''<br/><!-- GIDEROSMTD:Application:setOrientation(orientation) sets the orientation of the application -->
 
[[Special:MyLanguage/Application:setScaleMode|Application:setScaleMode]] ''<translate>sets the automatic scale mode of the application</translate>''<br/><!-- GIDEROSMTD:Application:setScaleMode(scaleMode) sets the automatic scale mode of the application -->
 
[[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 -->
 
 
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
  
=== <translate>Events</translate> ===
+
=== Events ===
[[Special:MyLanguage/Event.APPLICATION_START|Event.APPLICATION_START]]<br/>  
+
[[Event.APPLICATION_START]]<br/>
[[Special:MyLanguage/Event.APPLICATION_RESIZE|Event.APPLICATION_RESIZE]]<br/>  
+
[[Event.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/>
 +
[[Event.APPLICATION_PERMISSION]] '''new'''<br/>
 +
=== Constants ===
 +
[[Application.CONSTANTS|Application.LANDSCAPE_LEFT]]<br/><!--GIDEROSCST:Application.LANDSCAPE_LEFT landscapeLeft-->
 +
[[Application.CONSTANTS|Application.LANDSCAPE_RIGHT]]<br/><!--GIDEROSCST:Application.LANDSCAPE_RIGHT landscapeRight-->
 +
[[Application.CONSTANTS|Application.PORTRAIT]]<br/><!--GIDEROSCST:Application.PORTRAIT portrait-->
 +
[[Application.CONSTANTS|Application.PORTRAIT_UPSIDE_DOWN]]<br/><!--GIDEROSCST:Application.PORTRAIT_UPSIDE_DOWN portraitUpsideDown-->
  
------------------------------------------------------
+
[[Application.CONSTANTS|Application.CENTER]]<br/><!--GIDEROSCST:Application.CENTER center-->
You must delete this page[[APPLICATION_RESIZE]]<br/>
+
[[Application.CONSTANTS|Application.CROP]]<br/><!--GIDEROSCST:Application.CROP crop-->
 +
[[Application.CONSTANTS|Application.FIT_HEIGHT]]<br/><!--GIDEROSCST:Application.FIT_HEIGHT fitHeight-->
 +
[[Application.CONSTANTS|Application.FIT_WIDTH]]<br/><!--GIDEROSCST:Application.FIT_WIDTH fitWidth-->
 +
[[Application.CONSTANTS|Application.LETTERBOX]]<br/><!--GIDEROSCST:Application.LETTERBOX letterbox-->
 +
[[Application.CONSTANTS|Application.NO_SCALE]]<br/><!--GIDEROSCST:Application.NO_SCALE noScale-->
 +
[[Application.CONSTANTS|Application.PIXEL_PERFECT]]<br/><!--GIDEROSCST:Application.PIXEL_PERFECT pixelPerfect-->
 +
[[Application.CONSTANTS|Application.STRETCH]]<br/><!--GIDEROSCST:Application.STRETCH stretch-->
  
=== <translate>Constants</translate> ===
+
[[Application.CONSTANTS|Application.TEXTINPUT_CLASS_NONE]]<br/><!--GIDEROSCST:Application.TEXTINPUT_CLASS_NONE 0-->
[[Special:MyLanguage/Application.LANDSCAPE_LEFT|Application.LANDSCAPE_LEFT]]<br/><!-- GIDEROSCST:Application.LANDSCAPE_LEFT landscapeLeft-->
+
[[Application.CONSTANTS|Application.TEXTINPUT_CLASS_TEXT]]<br/><!--GIDEROSCST:Application.TEXTINPUT_CLASS_TEXT 1-->
[[Special:MyLanguage/Application.LANDSCAPE_RIGHT|Application.LANDSCAPE_RIGHT]]<br/><!-- GIDEROSCST:Application.LANDSCAPE_RIGHT landscapeRight-->
+
[[Application.CONSTANTS|Application.TEXTINPUT_CLASS_NUMBER]]<br/><!--GIDEROSCST:Application.TEXTINPUT_CLASS_NUMBER 2-->
[[Special:MyLanguage/Application.PORTRAIT|Application.PORTRAIT]]<br/><!-- GIDEROSCST:Application.PORTRAIT portrait-->
+
[[Application.CONSTANTS|Application.TEXTINPUT_CLASS_PHONE]]<br/><!--GIDEROSCST:Application.TEXTINPUT_CLASS_PHONE 3-->
[[Special:MyLanguage/Application.PORTRAIT_UPSIDE_DOWN|Application.PORTRAIT_UPSIDE_DOWN]]<br/><!-- GIDEROSCST:Application.PORTRAIT_UPSIDE_DOWN portraitUpsideDown-->
+
[[Application.CONSTANTS|Application.TEXTINPUT_CLASS_DATE]]<br/><!--GIDEROSCST:Application.TEXTINPUT_CLASS_DATE 4-->
 +
[[Application.CONSTANTS|Application.TEXTINPUT_TVARIANT_URI]]<br/><!--GIDEROSCST:Application.TEXTINPUT_TVARIANT_URI 0x10-->
 +
[[Application.CONSTANTS|Application.TEXTINPUT_TVARIANT_EMAIL]]<br/><!--GIDEROSCST:Application.TEXTINPUT_TVARIANT_EMAIL 0x20-->
 +
[[Application.CONSTANTS|Application.TEXTINPUT_TVARIANT_PASSWORD]]<br/><!--GIDEROSCST:Application.TEXTINPUT_TVARIANT_PASSWORD 0x80-->
 +
[[Application.CONSTANTS|Application.TEXTINPUT_DVARIANT_DATE]]<br/><!--GIDEROSCST:Application.TEXTINPUT_DVARIANT_DATE 0x10-->
 +
[[Application.CONSTANTS|Application.TEXTINPUT_DVARIANT_TIME]]<br/><!--GIDEROSCST:Application.TEXTINPUT_DVARIANT_TIME 0x20-->
 +
[[Application.CONSTANTS|Application.TEXTINPUT_NVARIANT_PASSWORD]]<br/><!--GIDEROSCST:Application.TEXTINPUT_NVARIANT_PASSWORD 0x10-->
 +
[[Application.CONSTANTS|Application.TEXTINPUT_TFLAG_CAPCHARACTERS]]<br/><!--GIDEROSCST:Application.TEXTINPUT_TFLAG_CAPCHARACTERS 0x1000-->
 +
[[Application.CONSTANTS|Application.TEXTINPUT_TFLAG_CAPWORDS]]<br/><!--GIDEROSCST:Application.TEXTINPUT_TFLAG_CAPWORDS 0x2000-->
 +
[[Application.CONSTANTS|Application.TEXTINPUT_TFLAG_CAPSENTENCES]]<br/><!--GIDEROSCST:Application.TEXTINPUT_TFLAG_CAPSENTENCES 0x4000-->
 +
[[Application.CONSTANTS|Application.TEXTINPUT_TFLAG_AUTOCORRECT]]<br/><!--GIDEROSCST:Application.TEXTINPUT_TFLAG_AUTOCORRECT 0x8000-->
 +
[[Application.CONSTANTS|Application.TEXTINPUT_TFLAG_MULTILINE]]<br/><!--GIDEROSCST:Application.TEXTINPUT_TFLAG_MULTILINE 0x20000-->
 +
[[Application.CONSTANTS|Application.TEXTINPUT_NFLAG_SIGNED]]<br/><!--GIDEROSCST:Application.TEXTINPUT_NFLAG_SIGNED 0x1000-->
 +
[[Application.CONSTANTS|Application.TEXTINPUT_NFLAG_DECIMAL]]<br/><!--GIDEROSCST:Application.TEXTINPUT_NFLAG_DECIMAL 0x2000-->
 
|}
 
|}
 +
 +
{{GIDEROS IMPORTANT LINKS}}

Latest revision as of 19:50, 15 December 2023

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

Description

The Application class contains the common functions that are 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:checkPermission checks android permission
Application:configureFrustum configures the projection for 3D perspective
Application:enableDrawInfo shows or hides Gideros info layer
Application:enableOnDemandDraw enable or disable on-demand rendering
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
Application:getClipboard returns content of the clipboard
Application:getContentHeight returns content height
Application:getContentWidth returns content width
Application:getDeviceHeight returns the physical height of the device
Application:getDeviceWidth returns the physical width of the device
Application:getDeviceInfo returns information about device
Application:getDeviceName returns the device name
Application:getDeviceOrientation gets 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:getNativePath returns the system path for a given resource
Application:getOrientation returns the orientation of the application
Application:getProjectProperties returns the project properties new
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 checks if app runs on player
Application:openUrl opens the given URL in the appropriate application
Application:requestPermissions requests an android permission
Application:set sets state of desktop settings
Application:setBackgroundColor sets the background color
Application:setClipboard stores data to the clipboard
Application:setEventMerging allows merging of touch/mouse move events
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 sets the keyboard visibility
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:setTextInput sets the IME of the android keyboard
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
Event.APPLICATION_PERMISSION new

Constants

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

Application.CENTER
Application.CROP
Application.FIT_HEIGHT
Application.FIT_WIDTH
Application.LETTERBOX
Application.NO_SCALE
Application.PIXEL_PERFECT
Application.STRETCH

Application.TEXTINPUT_CLASS_NONE
Application.TEXTINPUT_CLASS_TEXT
Application.TEXTINPUT_CLASS_NUMBER
Application.TEXTINPUT_CLASS_PHONE
Application.TEXTINPUT_CLASS_DATE
Application.TEXTINPUT_TVARIANT_URI
Application.TEXTINPUT_TVARIANT_EMAIL
Application.TEXTINPUT_TVARIANT_PASSWORD
Application.TEXTINPUT_DVARIANT_DATE
Application.TEXTINPUT_DVARIANT_TIME
Application.TEXTINPUT_NVARIANT_PASSWORD
Application.TEXTINPUT_TFLAG_CAPCHARACTERS
Application.TEXTINPUT_TFLAG_CAPWORDS
Application.TEXTINPUT_TFLAG_CAPSENTENCES
Application.TEXTINPUT_TFLAG_AUTOCORRECT
Application.TEXTINPUT_TFLAG_MULTILINE
Application.TEXTINPUT_NFLAG_SIGNED
Application.TEXTINPUT_NFLAG_DECIMAL