Difference between revisions of "Application"

From GiderosMobile
(added application scale constants)
Line 79: Line 79:
 
[[Application.CONSTANTS|Application.PIXEL_PERFECT]]<br/><!--GIDEROSCST:Application.PIXEL_PERFECT pixelPerfect-->
 
[[Application.CONSTANTS|Application.PIXEL_PERFECT]]<br/><!--GIDEROSCST:Application.PIXEL_PERFECT pixelPerfect-->
 
[[Application.CONSTANTS|Application.STRETCH]]<br/><!--GIDEROSCST:Application.STRETCH stretch-->
 
[[Application.CONSTANTS|Application.STRETCH]]<br/><!--GIDEROSCST:Application.STRETCH stretch-->
 +
 +
[[Application.CONSTANTS|Application.TEXTINPUT_CLASS_NONE]]<br/><!--GIDEROSCST:Application.TEXTINPUT_CLASS_NONE 0-->
 +
[[Application.CONSTANTS|Application.TEXTINPUT_CLASS_TEXT]]<br/><!--GIDEROSCST:Application.TEXTINPUT_CLASS_TEXT 1-->
 +
[[Application.CONSTANTS|Application.TEXTINPUT_CLASS_NUMBER]]<br/><!--GIDEROSCST:Application.TEXTINPUT_CLASS_NUMBER 2-->
 +
[[Application.CONSTANTS|Application.TEXTINPUT_CLASS_PHONE]]<br/><!--GIDEROSCST:Application.TEXTINPUT_CLASS_PHONE 3-->
 +
[[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}}
 
{{GIDEROS IMPORTANT LINKS}}

Revision as of 19:04, 5 December 2020

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

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: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: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: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 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: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: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

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