Struct xpcom::interfaces::nsIMessageLoop
[−]
[src]
#[repr(C)]pub struct nsIMessageLoop { /* fields omitted */ }
interface nsIMessageLoop : nsISupports
/**
* This service allows access to the current thread's Chromium MessageLoop
* instance, with some extra sugar added. If you're calling from C++, it may
* or may not make sense for you to use this interface. If you're calling from
* JS, you don't have a choice!
*
* Right now, you can only call PostIdleTask(), and the wrath of khuey is
* stopping you from adding other methods.
*
* nsIMessageLoop's contractid is "@mozilla.org/message-loop;1".
*/
Methods
impl nsIMessageLoop
[src]
pub fn coerce<T: nsIMessageLoopCoerce>(&self) -> &T
[src]
Cast this nsIMessageLoop
to one of its base interfaces.
impl nsIMessageLoop
[src]
pub unsafe fn PostIdleTask(
&self,
task: *const nsIRunnable,
ensureRunsAfterMS: uint32_t
) -> nsresult
[src]
&self,
task: *const nsIRunnable,
ensureRunsAfterMS: uint32_t
) -> nsresult
/**
* Posts a task to be run when this thread's message loop is idle, or after
* ensureRunsAfterMS milliseconds have elapsed. (That is, the task is
* guaranteed to run /eventually/.)
*
* Note that if the event loop is busy, we will hold a reference to the task
* until ensureRunsAfterMS milliseconds have elapsed. Be careful when
* specifying long timeouts and tasks which hold references to windows or
* other large objects, because you can leak memory in a difficult-to-detect
* way!
*/
void postIdleTask (in nsIRunnable task, in uint32_t ensureRunsAfterMS);
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIMessageLoop
[src]
const IID: nsIID
IID: nsIID = nsID(1049385192, 58668, 17376, [142, 102, 102, 156, 167, 136, 255, 95])
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 nsIMessageLoop
[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 nsIMessageLoop
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.