1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2/* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6#include "nsISupports.idl" 7 8interface nsIFile; 9 10webidl Element; 11 12[scriptable, uuid(2d1a95e4-5bd8-4eeb-b0a8-c1455fd2a357)] 13interface nsIShellService : nsISupports 14{ 15 /** 16 * Determines whether or not Firefox is the "Default Browser." 17 * This is simply whether or not Firefox is registered to handle 18 * http links. 19 * 20 * @param aForAllTypes true if the check should be made for HTTP and HTML. 21 * false if the check should be made for HTTP only. 22 * This parameter may be ignored on some platforms. 23 */ 24 boolean isDefaultBrowser([optional] in boolean aForAllTypes); 25 26 /** 27 * Registers Firefox as the "Default Browser." 28 * 29 * @param aClaimAllTypes Register Firefox as the handler for 30 * additional protocols (chrome etc) 31 * and web documents (.html, .xhtml etc). 32 * @param aForAllUsers Whether or not Firefox should attempt 33 * to become the default browser for all 34 * users on a multi-user system. 35 */ 36 void setDefaultBrowser(in boolean aClaimAllTypes, in boolean aForAllUsers); 37 38 /** 39 * Flags for positioning/sizing of the Desktop Background image. 40 */ 41 const long BACKGROUND_TILE = 1; 42 const long BACKGROUND_STRETCH = 2; 43 const long BACKGROUND_CENTER = 3; 44 const long BACKGROUND_FILL = 4; 45 const long BACKGROUND_FIT = 5; 46 const long BACKGROUND_SPAN = 6; 47 48 /** 49 * Sets the desktop background image using either the HTML <IMG> 50 * element supplied or the background image of the element supplied. 51 * 52 * @param aImageElement Either a HTML <IMG> element or an element with 53 * a background image from which to source the 54 * background image. 55 * @param aPosition How to place the image on the desktop 56 * @param aImageName The image name. Equivalent to the leaf name of the 57 * location.href. 58 */ 59 void setDesktopBackground(in Element aElement, 60 in long aPosition, 61 in ACString aImageName); 62 63 /** 64 * The desktop background color, visible when no background image is 65 * used, or if the background image is centered and does not fill the 66 * entire screen. A rgb value, where (r << 16 | g << 8 | b) 67 */ 68 attribute unsigned long desktopBackgroundColor; 69}; 70