Class Index | File Index

Classes


Class Orientation


Defined in: phonegap.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
This class provides access to the device orientation.
Field Summary
Field Attributes Field Name and Description
 
The last known orientation.
Method Summary
Method Attributes Method Name and Description
 
clearWatch(watchId)
Clears the specified orientation watch.
 
getCurrentOrientation(successCallback, errorCallback)
Asynchronously aquires the current orientation.
 
watchOrientation(successCallback, errorCallback)
Asynchronously aquires the orientation repeatedly at a given interval.
Class Detail
Orientation()
This class provides access to the device orientation.
Field Detail
lastOrientation
The last known orientation.
Method Detail
clearWatch(watchId)
Clears the specified orientation watch.
Parameters:
{String} watchId
The ID of the watch returned from #watchOrientation.

getCurrentOrientation(successCallback, errorCallback)
Asynchronously aquires the current orientation.
Parameters:
{Function} successCallback
The function to call when the orientation is known.
{Function} errorCallback
The function to call when there is an error getting the orientation.

watchOrientation(successCallback, errorCallback)
Asynchronously aquires the orientation repeatedly at a given interval.
Parameters:
{Function} successCallback
The function to call each time the orientation data is available.
{Function} errorCallback
The function to call when there is an error getting the orientation data.

Documentation generated by JsDoc Toolkit 2.1.0 on Tue May 05 2009 14:44:46 GMT-0700 (PDT)