|
|
| Line 95: |
Line 95: |
| |- | | |- |
| | ''In:'' | | | ''In:'' |
| | addIdleObserver(), e.g. addIdleObserver(someIdleObserverObject); | | | addIdleObserver |
| | someIdleObserverObject = {time: someIntValInSeconds, onidle: someIdleCallbackFunction; onactive: someActiveCallbackFunction} | | | argument = {time: seconds, onidle: function, onactive: function} |
| | 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 second and a maximum of a PRUint32. Erroneous requested idle times are checked. '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(someIdleObserverObject) | | | removeIdleObserver |
| | someIdleObserverObject = {time: someIntValInSeconds, onidle: someIdleCallbackFunction; onactive: someActiveCallbackFunction} | | | argument = {time: seconds, onidle: function, onactive: function} |
| | 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 | | | Yes, the idle time is also passed to this function. See the note below. |
| |- | | |- |
| | ''Out:'' | | | ''Out:'' |
| | Idle callback function. Active callback function. | | | Call into Idle/Active callbacks. |
| | None | | | None |
| | The idle and active callback functions are determined by the front end developer. No arguments are passed to the callback functions. | | | No arguments are passed to the callback functions. |
| |} | | |} |
| | |
| | Note: 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 |
|
| |
|
| <br> | | <br> |