Struct xpcom::interfaces::nsIAppStartup
[−]
[src]
#[repr(C)]pub struct nsIAppStartup { /* fields omitted */ }
interface nsIAppStartup : nsISupports
Methods
impl nsIAppStartup
[src]
pub fn coerce<T: nsIAppStartupCoerce>(&self) -> &T
[src]
Cast this nsIAppStartup
to one of its base interfaces.
impl nsIAppStartup
[src]
pub const eConsiderQuit: i64
eConsiderQuit: i64 = 1
/**
* The following flags may be passed as the aMode parameter to the quit
* method. One and only one of the "Quit" flags must be specified. The
* eRestart flag may be bit-wise combined with one of the "Quit" flags to
* cause the application to restart after it quits.
*/
/**
* Attempt to quit if all windows are closed.
*/
pub const eAttemptQuit: i64
eAttemptQuit: i64 = 2
/**
* Try to close all windows, then quit if successful.
*/
pub const eForceQuit: i64
eForceQuit: i64 = 3
/**
* Quit, damnit!
*/
pub const eRestart: i64
eRestart: i64 = 16
/**
* Restart the application after quitting. The application will be
* restarted with the same profile and an empty command line.
*/
pub const eRestartNotSameProfile: i64
eRestartNotSameProfile: i64 = 256
/**
* Restart the application after quitting. The application will be
* restarted with an empty command line and the normal profile selection
* process will take place on startup.
*/
pub unsafe fn CreateHiddenWindow(&self) -> nsresult
[src]
/**
* Create the hidden window.
*/
void createHiddenWindow ();
pub unsafe fn DestroyHiddenWindow(&self) -> nsresult
[src]
/**
* Destroys the hidden window. This will have no effect if the hidden window
* has not yet been created.
*/
void destroyHiddenWindow ();
pub unsafe fn Run(&self) -> nsresult
[src]
/**
* Runs an application event loop: normally the main event pump which
* defines the lifetime of the application. If there are no windows open
* and no outstanding calls to enterLastWindowClosingSurvivalArea this
* method will exit immediately.
*
* @returnCode NS_SUCCESS_RESTART_APP
* This return code indicates that the application should be
* restarted because quit was called with the eRestart flag.
* @returnCode NS_SUCCESS_RESTART_APP_NOT_SAME_PROFILE
* This return code indicates that the application should be
* restarted without necessarily using the same profile because
* quit was called with the eRestartNotSameProfile flag.
*/
void run ();
pub unsafe fn EnterLastWindowClosingSurvivalArea(&self) -> nsresult
[src]
/**
* There are situations where all application windows will be
* closed but we don't want to take this as a signal to quit the
* app. Bracket the code where the last window could close with
* these.
*/
void enterLastWindowClosingSurvivalArea ();
pub unsafe fn ExitLastWindowClosingSurvivalArea(&self) -> nsresult
[src]
void exitLastWindowClosingSurvivalArea ();
pub unsafe fn GetAutomaticSafeModeNecessary(
&self,
aAutomaticSafeModeNecessary: *mut bool
) -> nsresult
[src]
&self,
aAutomaticSafeModeNecessary: *mut bool
) -> nsresult
/**
* Startup Crash Detection
*
* Keeps track of application startup begining and success using flags to
* determine whether the application is crashing on startup.
* When the number of crashes crosses the acceptable threshold, safe mode
* or other repair procedures are performed.
*/
/**
* Whether automatic safe mode is necessary at this time. This gets set
* in trackStartupCrashBegin.
*
* @see trackStartupCrashBegin
*/
readonly attribute boolean automaticSafeModeNecessary;
pub unsafe fn RestartInSafeMode(&self, aQuitMode: uint32_t) -> nsresult
[src]
/**
* Restart the application in safe mode
* @param aQuitMode
* This parameter modifies how the app is shutdown.
* @see nsIAppStartup::quit
*/
void restartInSafeMode (in uint32_t aQuitMode);
pub unsafe fn CreateInstanceWithProfile(
&self,
aProfile: *const nsIToolkitProfile
) -> nsresult
[src]
&self,
aProfile: *const nsIToolkitProfile
) -> nsresult
/**
* Run a new instance of this app with a specified profile
* @param aProfile
* The profile we want to use.
* @see nsIAppStartup::quit
*/
void createInstanceWithProfile (in nsIToolkitProfile aProfile);
pub unsafe fn TrackStartupCrashBegin(&self, _retval: *mut bool) -> nsresult
[src]
/**
* If the last startup crashed then increment a counter.
* Set a flag so on next startup we can detect whether TrackStartupCrashEnd
* was called (and therefore the application crashed).
* @return whether safe mode is necessary
*/
bool trackStartupCrashBegin ();
pub unsafe fn TrackStartupCrashEnd(&self) -> nsresult
[src]
/**
* We have succesfully started without crashing. Clear flags that were
* tracking past crashes.
*/
void trackStartupCrashEnd ();
pub unsafe fn Quit(&self, aMode: uint32_t) -> nsresult
[src]
/**
* Exit the event loop, and shut down the app.
*
* @param aMode
* This parameter modifies how the app is shutdown, and it is
* constructed from the constants defined above.
*/
void quit (in uint32_t aMode);
pub unsafe fn GetShuttingDown(&self, aShuttingDown: *mut bool) -> nsresult
[src]
/**
* True if the application is in the process of shutting down.
*/
readonly attribute boolean shuttingDown;
pub unsafe fn GetStartingUp(&self, aStartingUp: *mut bool) -> nsresult
[src]
/**
* True if the application is in the process of starting up.
*
* Startup is complete once all observers of final-ui-startup have returned.
*/
readonly attribute boolean startingUp;
pub unsafe fn DoneStartingUp(&self) -> nsresult
[src]
/**
* Mark the startup as completed.
*
* Called at the end of startup by nsAppRunner.
*/
[noscript] void doneStartingUp ();
pub unsafe fn GetRestarting(&self, aRestarting: *mut bool) -> nsresult
[src]
/**
* True if the application is being restarted
*/
readonly attribute boolean restarting;
pub unsafe fn GetWasRestarted(&self, aWasRestarted: *mut bool) -> nsresult
[src]
/**
* True if this is the startup following restart, i.e. if the application
* was restarted using quit(eRestart*).
*/
readonly attribute boolean wasRestarted;
pub unsafe fn GetInterrupted(&self, aInterrupted: *mut bool) -> nsresult
[src]
/**
* True if startup was interrupted by an interactive prompt.
*/
attribute boolean interrupted;
pub unsafe fn SetInterrupted(&self, aInterrupted: bool) -> nsresult
[src]
/**
* True if startup was interrupted by an interactive prompt.
*/
attribute boolean interrupted;
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 nsIAppStartup
[src]
const IID: nsIID
IID: nsIID = nsID(1713501909, 27652, 18958, [158, 116, 68, 125, 178, 33, 72, 78])
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 nsIAppStartup
[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 nsIAppStartup
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.