WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIAppShellService

IID:93a28ba2-7e22-11d9-9b6f-000a95d535fa
Inherits From:nsISupports

This interface is intended to be used as a service.

This interface is implemented by the following components:


Constants

Create a window, which will be initially invisible.
PRInt32 SIZE_TO_CONTENT = -1

Properties

readonly PRBool applicationProvidedHiddenWindow

Return true if the application hidden window was provided by the application. If it wasn't, the default hidden window was used. This will usually be false on all non-mac platforms.

readonly nsIDOMWindowInternal hiddenDOMWindow

Return the (singleton) application hidden window, automatically created and maintained by this AppShellService.

readonly nsIXULWindow hiddenWindow

Return the (singleton) application hidden window, automatically created and maintained by this AppShellService.


Methods

[noscript] void createHiddenWindow ( nsIAppShell appShell ) nsIXULWindow createTopLevelWindow ( nsIXULWindow parent , nsIURI url , PRUint32 chromeMask , PRInt32 initialWidth , PRInt32 initialHeight , nsIAppShell appShell ) void destroyHiddenWindow ( ) [noscript] void getHiddenWindowAndJSContext ( out nsIDOMWindowInternal hiddenDOMWindow , out JSContext* JSContext ) void registerTopLevelWindow ( nsIXULWindow window ) void topLevelWindowIsModal ( nsIXULWindow window , PRBool modal ) void unregisterTopLevelWindow ( nsIXULWindow window )

void createHiddenWindow ( nsIAppShell appShell )

Arguments:
appShell

nsIXULWindow createTopLevelWindow ( nsIXULWindow parent , nsIURI url , PRUint32 chromeMask , PRInt32 initialWidth , PRInt32 initialHeight , nsIAppShell appShell )

Arguments:
parent
url
chromeMask
initialWidth
initialHeight
appShell

void destroyHiddenWindow ( )


void getHiddenWindowAndJSContext ( out nsIDOMWindowInternal hiddenDOMWindow , out JSContext* JSContext )

Return the (singleton) application hidden window as an nsIDOMWindowInternal, and, the corresponding JavaScript context pointer. This is useful if you'd like to subsequently call OpenDialog on the hidden window.

Arguments:
hiddenDOMWindow
JSContext

void registerTopLevelWindow ( nsIXULWindow window )

Add a window to the application's registry of windows. These windows are generally shown in the Windows taskbar, and the application knows it can't quit until it's out of registered windows.

Arguments:
window: the window to register

void topLevelWindowIsModal ( nsIXULWindow window , PRBool modal )

The appshell service needs to be informed of modal XUL windows currently open. Call this method as a window becomes modal or as it becomes nonmodal.

Arguments:
window: no surprises here
modal: true if window is becoming modal false if window is becoming nonmodal (or being closed)

void unregisterTopLevelWindow ( nsIXULWindow window )

Remove a window from the application's window registry. Note that this method won't automatically attempt to quit the app when the last window is unregistered. For that, see Quit().

Arguments:
window: you see the pattern

Reference documentation is generated from Mozilla's source.

Copyright © 1999-2006 XULPlanet.com