nsIIdleService
| IID: | cc52f19a-63ae-4a1c-9cc3-e79eace0b471 |
| Inherits From: | nsISupports |
This interface lets you monitor how long the user has been 'idle', i.e. not used their mouse or keyboard. You can get the idle time directly, but in most cases you will want to register an observer for a predefined interval. The observer will get an 'idle' notification when the user is idle for that interval (or longer), and receive a 'back' notification when the user starts using their computer again.
This interface is implemented by the following components:
Properties
readonly PRUint32 idleTime
The amount of time in milliseconds that has passed since the last user activity.
Methods
void addIdleObserver ( nsIObserver observer , PRUint32 time )
void removeIdleObserver ( nsIObserver observer , PRUint32 time )
void addIdleObserver ( nsIObserver observer , PRUint32 time )
Add an observer to be notified when the user idles for some period of time, and when they get back from that.
- Arguments:
- observer: the observer to be notified
- time: the amount of time in seconds the user should be idle before the observer should be notified.
void removeIdleObserver ( nsIObserver observer , PRUint32 time )
Remove an observer registered with addIdleObserver.
- Arguments:
- observer: the observer that needs to be removed.
- time: the amount of time they were listening for.
Reference documentation is generated from Mozilla's source.
