Privacy/Reviews/OSIdleAPI: Difference between revisions

Line 95: Line 95:
|-
|-
| ''In:''  
| ''In:''  
| addIdleObserver(), e.g. addIdleObserver(idleObserverObject);
| addIdleObserver(), e.g. addIdleObserver(someIdleObserverObject);
| idleObserverObject = {time: someIntValInSeconds, onidle: someIdleCallbackFunction; onactive: someActiveCallbackFunction}
| someIdleObserverObject = {time: someIntValInSeconds, onidle: someIdleCallbackFunction; onactive: someActiveCallbackFunction}
| The idleObserverObject is passed as a paramater to function addIdleObserver(). 'someIntValInSeconds' is the requested idle time in seconds that needs to elapse before the idle observer receives 'idle' notifications. 'someIntValInSeconds' must be a minimum of 1 seconds and a maximum of a PRUint32. 'someIdleCallbackFunction' is the front-end developer defined callback function that is to be called when the user is idle for 'someIntValInSeconds'. 'someActiveCallbackFunction' is the front-end developer defined callback function that is to be called when the user transitions from an idle state to an active state. Please see sample test file: http://mxr.mozilla.org/mozilla-central/source/dom/base/test/test_bug715041.xul
| The idleObserverObject is passed as a paramater to function addIdleObserver(). 'someIntValInSeconds' is the requested idle time in seconds that needs to elapse before the idle observer receives 'idle' notifications. 'someIntValInSeconds' must be a minimum of 1 seconds and a maximum of a PRUint32. 'someIdleCallbackFunction' is the front-end developer defined callback function that is to be called when the user is idle for 'someIntValInSeconds'. 'someActiveCallbackFunction' is the front-end developer defined callback function that is to be called when the user transitions from an idle state to an active state. Please see sample test file: http://mxr.mozilla.org/mozilla-central/source/dom/base/test/test_bug715041.xul
|-
|-
| ''In:''  
| ''In:''  
| removeIdleObserver(), e.g. removeIdleObserver(idleObserverObject)
| removeIdleObserver(), e.g. removeIdleObserver(someIdleObserverObject)
| idleObserverObject = {time: someIntValInSeconds, onidle: someIdleCallbackFunction; onactive: someActiveCallbackFunction}
| someIdleObserverObject = {time: someIntValInSeconds, onidle: someIdleCallbackFunction; onactive: someActiveCallbackFunction}
| The idleObserverObject is passed as a paramater to function addIdleObserver(). 'someIntValInSeconds' is the requested idle time in seconds that needs to elapse before the idle observer receives 'idle' notifications. 'someIntValInSeconds' must be a minimum of 1 seconds and a maximum of a PRUint32. 'someIdleCallbackFunction' is the front-end developer defined callback function that is to be called when the user is idle for 'someIntValInSeconds'. 'someActiveCallbackFunction' is the front-end developer defined callback function that is to be called when the user transitions from an idle state to an active state. Please see sample test file: http://mxr.mozilla.org/mozilla-central/source/dom/base/test/test_bug715041.xul
| The idleObserverObject is passed as a paramater to function addIdleObserver(). 'someIntValInSeconds' is the requested idle time in seconds that needs to elapse before the idle observer receives 'idle' notifications. 'someIntValInSeconds' must be a minimum of 1 seconds and a maximum of a PRUint32. 'someIdleCallbackFunction' is the front-end developer defined callback function that is to be called when the user is idle for 'someIntValInSeconds'. 'someActiveCallbackFunction' is the front-end developer defined callback function that is to be called when the user transitions from an idle state to an active state. Please see sample test file: http://mxr.mozilla.org/mozilla-central/source/dom/base/test/test_bug715041.xul
|-
|-
76

edits