Difference between revisions of "touch"
Jump to navigation
Jump to search
(Created page with "'''touch''' is a table of perperties and functions introduced in OS 3.4 (tablets) related to touchscreen handling. <br /><br /> It is visible on all platf...") |
m |
||
Line 1: | Line 1: | ||
− | '''touch''' is a table of | + | '''touch''' is a table of properties and functions introduced in [[Changes_in_OS_3.4|OS 3.4]] (tablets) related to touchscreen handling. |
<br /><br /> | <br /><br /> | ||
Revision as of 22:31, 15 July 2013
touch is a table of properties and functions introduced in OS 3.4 (tablets) related to touchscreen handling.
It is visible on all platforms but may ignore calls to its functions if the platform running the script does not support touch. The touch library others a low level interface enabling script authors to develop scripts running on all platforms equally. But it also places the effort on the script writer to design and test the script for all different platforms if platform compatibility is desired.
The touch table contains :
- enabled : Returns true if the platform supports touch, otherwise false. If touch is supported, it is recommended to use the ppi values to calculate touch target sizes.
- isKeyboardVisible() : Returns true if any keyboard is visible (docked, oating and split keyboards).
- isKeyboardAvailable : Returns true if an on-screen keyboard is available on the platform, otherwise false.
- showKeyboard(boolean) : Causes the docked ABC keyboard to appear on the screen if no keyboard is currently visible. Default is true.
- ppi : Returns pixels per inches along the diagonal of the screen. This function is useful to determine the touch target size of touchable objects on the screen.
- xppi : Returns pixels per inches along the x axis of the screen. This function is useful to determine the touch target size of touchable objects on the screen.
- yppi : Returns pixels per inches along the y axis of the screen. This function is useful to determine the touch target size of touchable objects on the screen.