Public Member Functions | Public Attributes

nsIAppStartup Interface Reference

import "nsIAppStartup.idl";

Inheritance diagram for nsIAppStartup:

List of all members.

Public Member Functions

void createHiddenWindow ()
 Create the hidden window.
void destroyHiddenWindow ()
 Destroys the hidden window.
void run ()
 Runs an application event loop: normally the main event pump which defines the lifetime of the application.
void enterLastWindowClosingSurvivalArea ()
 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.
void exitLastWindowClosingSurvivalArea ()
void quit (in PRUint32 aMode)
 Exit the event loop, and shut down the app.

Public Attributes

const PRUint32 eConsiderQuit = 0x01
 The following flags may be passed as the aMode parameter to the quit method.
const PRUint32 eAttemptQuit = 0x02
 Try to close all windows, then quit if successful.
const PRUint32 eForceQuit = 0x03
 Quit, damnit!
const PRUint32 eRestart = 0x10
 Restart the application after quitting.

Member Function Documentation

void nsIAppStartup::createHiddenWindow (  ) 

Create the hidden window.

void nsIAppStartup::destroyHiddenWindow (  ) 

Destroys the hidden window.

This will have no effect if the hidden window has not yet been created.

void nsIAppStartup::enterLastWindowClosingSurvivalArea (  ) 

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 nsIAppStartup::exitLastWindowClosingSurvivalArea (  ) 
void nsIAppStartup::quit ( in PRUint32  aMode  ) 

Exit the event loop, and shut down the app.

Parameters:
aMode This parameter modifies how the app is shutdown, and it is constructed from the constants defined above.
void nsIAppStartup::run (  ) 

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.

NS_SUCCESS_RESTART_APP This return code indicates that the application should be restarted because quit was called with the eRestart flag.


Member Data Documentation

const PRUint32 nsIAppStartup::eAttemptQuit = 0x02

Try to close all windows, then quit if successful.

const PRUint32 nsIAppStartup::eConsiderQuit = 0x01

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.

const PRUint32 nsIAppStartup::eForceQuit = 0x03

Quit, damnit!

const PRUint32 nsIAppStartup::eRestart = 0x10

Restart the application after quitting.

The application will be restarted with the same profile and an empty command line.


The documentation for this interface was generated from the following file: