Difference between revisions of "Changes in OS 3.4"

From Inspired-Lua Wiki
Jump to navigation Jump to search
m
m
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
The OS version 3.4 is the one running on the iPad Applications.<br />
 +
 +
 +
'''Changes :'''
 +
 
* a new [[platform.apiLevel]] : "2.2"
 
* a new [[platform.apiLevel]] : "2.2"
  
* a new table, [[touch]], which contains these functions :
 
: [[touch.enabled|enabled]]
 
: [[touch.xppi|xppi]]
 
: [[touch.ppi|ppi]]
 
: [[touch.isKeyboardVisible|isKeyboardVisible]]
 
: [[touch.isKeyboardAvailable|isKeyboardAvailable]]
 
: [[touch.yppi|yppi]]
 
: [[touch.showKeyboard|showKeyboard]]
 
  
* a new function in the [[platform]] object : [[platform.isTabletModeRendering]] -- self explanatory : returns true if the script is running on a tablet device, false otherwise.
+
* a new "library" (table), [[touch]] :
 +
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 offers 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 :
 +
: [[touch.enabled|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.
 +
: [[touch.isKeyboardVisible|isKeyboardVisible]]() : Returns true if any keyboard is visible (docked,  oating and split keyboards).
 +
: [[touch.isKeyboardAvailable|isKeyboardAvailable]] : Returns true if an on-screen keyboard is available on the platform, otherwise false.
 +
: [[touch.showKeyboard|showKeyboard]](boolean) : Causes the docked ABC keyboard to appear on the screen if no keyboard is currently visible. Default is true.
 +
: [[touch.ppi|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.
 +
: [[touch.xppi|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.
 +
: [[touch.yppi|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.
 +
 
 +
 
 +
* new functions in the [[platform]] object :
 +
: [[platform.isTabletModeRendering]] -- self explanatory : returns true if the script is running on a tablet device, false otherwise.
 +
: [[platform.window:getScrollHeight]]() and [[platform.window:setScrollHeight]]() which respectively return and set the height of the available window size when the tablet's on-screen keyboard is shown.
 +
 
 +
 
 +
* new event handlers :
 +
: [[on.keyboardUp]]() which fires when the tablet's on-screen keyboard gets shown.
 +
: [[on.keyboardDown]]() which fires when the tablet's on-screen keyboard gets hidden.

Latest revision as of 23:18, 15 July 2013

The OS version 3.4 is the one running on the iPad Applications.


Changes :


  • a new "library" (table), touch :

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 offers 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.


platform.isTabletModeRendering -- self explanatory : returns true if the script is running on a tablet device, false otherwise.
platform.window:getScrollHeight() and platform.window:setScrollHeight() which respectively return and set the height of the available window size when the tablet's on-screen keyboard is shown.


  • new event handlers :
on.keyboardUp() which fires when the tablet's on-screen keyboard gets shown.
on.keyboardDown() which fires when the tablet's on-screen keyboard gets hidden.