nsIShellService

IID:d6f62053-3769-46f6-bd2b-0a1440d6c394
Inherits From:nsISupports

This interface is intended to be used as a service. To create an object implementing this interface:

var obj = Components.classes["@mozilla.org/browser/shell-service;1"].
            getService(Components.interfaces.nsIShellService);

Constants

Flags for positioning/sizing of the Desktop Background image.
PRInt32 BACKGROUND_TILE = 1
PRInt32 BACKGROUND_STRETCH = 2
PRInt32 BACKGROUND_CENTER = 3
PRInt32 BACKGROUND_FILL = 4
Constants identifying applications that can be opened with openApplication.
PRInt32 APPLICATION_MAIL = 0
PRInt32 APPLICATION_NEWS = 1

Properties

PRUint32 desktopBackgroundColor

The desktop background color, visible when no background image is used, or if the background image is centered and does not fill the entire screen. A rgb value, where (r << 16 g << 8 b)

PRBool shouldCheckDefaultBrowser

Used to determine whether or not to show a "Set Default Browser" query dialog. This attribute is true if the application is starting up and "browser.shell.checkDefaultBrowser" is true, otherwise it is false.


Methods

PRBool isDefaultBrowser ( PRBool startupCheck ) void openApplication ( PRInt32 application ) void setDefaultBrowser ( PRBool claimAllTypes , PRBool forAllUsers ) void setDesktopBackground ( nsIDOMElement element , PRInt32 position )

PRBool isDefaultBrowser ( PRBool startupCheck )

Determines whether or not Firefox is the "Default Browser." This is simply whether or not Firefox is registered to handle http links.

Arguments:
startupCheck: true if this is the check being performed by the first browser window at startup, false otherwise.

void openApplication ( PRInt32 application )

Opens the application specified. If more than one application of the given type is available on the system, the default or "preferred" application is used.

Arguments:
application

void setDefaultBrowser ( PRBool claimAllTypes , PRBool forAllUsers )

Registers Firefox as the "Default Browser."

Arguments:
claimAllTypes: Register Firefox as the handler for additional protocols (ftp, chrome etc) and web documents (.html, .xhtml etc).
forAllUsers: Whether or not Firefox should attempt to become the default browser for all users on a multi-user system.

void setDesktopBackground ( nsIDOMElement element , PRInt32 position )

Sets the desktop background image using either the HTML element supplied or the background image of the element supplied.

Arguments:
element
position: How to place the image on the desktop

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com