Struct xpcom::interfaces::nsIAppShell
[−]
[src]
#[repr(C)]pub struct nsIAppShell { /* fields omitted */ }
interface nsIAppShell : nsISupports
/**
* Interface for the native event system layer. This interface is designed
* to be used on the main application thread only.
*/
Methods
impl nsIAppShell
[src]
pub fn coerce<T: nsIAppShellCoerce>(&self) -> &T
[src]
Cast this nsIAppShell
to one of its base interfaces.
impl nsIAppShell
[src]
pub unsafe fn Run(&self) -> nsresult
[src]
/**
* Enter an event loop. Don't leave until exit() is called.
*/
void run ();
pub unsafe fn Exit(&self) -> nsresult
[src]
/**
* Exit the handle event loop
*/
void exit ();
pub unsafe fn FavorPerformanceHint(
&self,
favorPerfOverStarvation: bool,
starvationDelay: uint32_t
) -> nsresult
[src]
&self,
favorPerfOverStarvation: bool,
starvationDelay: uint32_t
) -> nsresult
/**
* Give hint to native event queue notification mechanism. If the native
* platform needs to tradeoff performance vs. native event starvation this
* hint tells the native dispatch code which to favor. The default is to
* prevent native event starvation.
*
* Calls to this function may be nested. When the number of calls that pass
* PR_TRUE is subtracted from the number of calls that pass PR_FALSE is
* greater than 0, performance is given precedence over preventing event
* starvation.
*
* The starvationDelay arg is only used when favorPerfOverStarvation is
* PR_FALSE. It is the amount of time in milliseconds to wait before the
* PR_FALSE actually takes effect.
*/
void favorPerformanceHint (in boolean favorPerfOverStarvation, in unsigned long starvationDelay);
pub unsafe fn SuspendNative(&self) -> nsresult
[src]
/**
* Suspends the use of additional platform-specific methods (besides the
* nsIAppShell->run() event loop) to run Gecko events on the main
* application thread. Under some circumstances these "additional methods"
* can cause Gecko event handlers to be re-entered, sometimes leading to
* hangs and crashes. Calls to suspendNative() and resumeNative() may be
* nested. On some platforms (those that don't use any "additional
* methods") this will be a no-op. Does not (in itself) stop Gecko events
* from being processed on the main application thread. But if the
* nsIAppShell->run() event loop is blocked when this call is made, Gecko
* events will stop being processed until resumeNative() is called (even
* if a plugin or library is temporarily processing events on a nested
* event loop).
*/
void suspendNative ();
pub unsafe fn ResumeNative(&self) -> nsresult
[src]
/**
* Resumes the use of additional platform-specific methods to run Gecko
* events on the main application thread. Calls to suspendNative() and
* resumeNative() may be nested. On some platforms this will be a no-op.
*/
void resumeNative ();
pub unsafe fn GetEventloopNestingLevel(
&self,
aEventloopNestingLevel: *mut uint32_t
) -> nsresult
[src]
&self,
aEventloopNestingLevel: *mut uint32_t
) -> nsresult
/**
* The current event loop nesting level.
*/
readonly attribute unsigned long eventloopNestingLevel;
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 nsIAppShell
[src]
const IID: nsIID
IID: nsIID = nsID(2094384925, 8763, 19198, [147, 29, 94, 237, 177, 242, 176, 31])
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 nsIAppShell
[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 nsIAppShell
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.