Struct xpcom::interfaces::nsIIdleServiceInternal
[−]
[src]
#[repr(C)]pub struct nsIIdleServiceInternal { /* fields omitted */ }
interface nsIIdleServiceInternal : nsIIdleService
Methods
impl nsIIdleServiceInternal
[src]
pub fn coerce<T: nsIIdleServiceInternalCoerce>(&self) -> &T
[src]
Cast this nsIIdleServiceInternal
to one of its base interfaces.
impl nsIIdleServiceInternal
[src]
pub unsafe fn ResetIdleTimeOut(&self, idleDeltaInMS: uint32_t) -> nsresult
[src]
/**
* "Resets the idle time to the value specified."
*
* @param idleDelta the time (in milliseconds) since the last user inter
* action
**/
void resetIdleTimeOut (in unsigned long idleDeltaInMS);
Methods from Deref<Target = nsIIdleService>
pub fn coerce<T: nsIIdleServiceCoerce>(&self) -> &T
[src]
Cast this nsIIdleService
to one of its base interfaces.
pub unsafe fn GetIdleTime(&self, aIdleTime: *mut uint32_t) -> nsresult
[src]
/**
* The amount of time in milliseconds that has passed
* since the last user activity.
*
* If we do not have a valid idle time to report, 0 is returned
* (this can happen if the user never interacted with the browser
* at all, and if we are also unable to poll for idle time manually).
*/
readonly attribute unsigned long idleTime;
pub unsafe fn AddIdleObserver(
&self,
observer: *const nsIObserver,
time: uint32_t
) -> nsresult
[src]
&self,
observer: *const nsIObserver,
time: uint32_t
) -> nsresult
/**
* Add an observer to be notified when the user idles for some period of
* time, and when they get back from that.
*
* @param observer the observer to be notified
* @param time the amount of time in seconds the user should be idle before
* the observer should be notified.
*
* @note
* The subject of the notification the observer will get is always the
* nsIIdleService itself.
* When the user goes idle, the observer topic is "idle" and when he gets
* back, the observer topic is "active".
* The data param for the notification contains the current user idle time.
*
* @note
* You can add the same observer twice.
* @note
* Most implementations need to poll the OS for idle info themselves,
* meaning your notifications could arrive with a delay up to the length
* of the polling interval in that implementation.
* Current implementations use a delay of 5 seconds.
*/
void addIdleObserver (in nsIObserver observer, in unsigned long time);
pub unsafe fn RemoveIdleObserver(
&self,
observer: *const nsIObserver,
time: uint32_t
) -> nsresult
[src]
&self,
observer: *const nsIObserver,
time: uint32_t
) -> nsresult
/**
* Remove an observer registered with addIdleObserver.
* @param observer the observer that needs to be removed.
* @param time the amount of time they were listening for.
* @note
* Removing an observer will remove it once, for the idle time you specify.
* If you have added an observer multiple times, you will need to remove it
* just as many times.
*/
void removeIdleObserver (in nsIObserver observer, in unsigned long time);
Trait Implementations
impl XpCom for nsIIdleServiceInternal
[src]
const IID: nsIID
IID: nsIID = nsID(2072617703, 60690, 17120, [184, 109, 73, 132, 35, 154, 189, 123])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsIIdleServiceInternal
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIIdleServiceInternal
[src]
type Target = nsIIdleService
The resulting type after dereferencing.
fn deref(&self) -> &nsIIdleService
[src]
Dereferences the value.