1/* -*- Mode: IDL; 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 7#include "nsISupports.idl" 8 9interface nsIFile; 10 11webidl Element; 12 13[scriptable, uuid(d7a19d24-9c98-4f88-b11e-52fa8c39ceea)] 14interface nsIShellService : nsISupports 15{ 16 /** 17 * app types we can be registered to handle 18 */ 19 const unsigned short BROWSER = 0x0001; 20 const unsigned short MAIL = 0x0002; 21 const unsigned short NEWS = 0x0004; 22 const unsigned short RSS = 0x0008; 23 24 /** 25 * Determines whether or not SeaMonkey is the "Default Client" for the 26 * passed in app type. 27 * 28 * This is simply whether or not SeaMonkey is registered to handle 29 * the url schemes associated with the app. 30 * 31 * @param aStartupCheck true if this is the check being performed 32 * by the first window at startup, 33 * false otherwise. 34 * @param aApps the application types being tested (Browser, Mail, News, RSS) 35 */ 36 boolean isDefaultClient(in boolean aStartupCheck, in unsigned short aApps); 37 38 /** 39 * Registers SeaMonkey as the "Default Client" for the 40 * passed in app types. 41 * 42 * @param aForAllUsers Whether or not SeaMonkey should attempt 43 * to become the default client for all 44 * users on a multi-user system. 45 * @param aClaimAllTypes Register SeaMonkey as the handler for 46 * additional protocols (ftp, chrome etc) 47 * and web documents (.html, .xhtml etc). 48 * @param aApps the application types being tested (Mail, News, Browser, RSS) 49 */ 50 void setDefaultClient(in boolean aForAllUsers, in boolean aClaimAllTypes, in unsigned short aApps); 51 52 /** 53 * Sets the desktop background image using either the HTML <IMG> 54 * element supplied or the background image of the element supplied. 55 * 56 * @param aImageElement Either a HTML <IMG> element or an element with 57 * a background image from which to source the 58 * background image. 59 * @param aPosition How to place the image on the desktop 60 * @param aImageName The image name. Equivalent to the leaf name of the 61 * location.href. 62 */ 63 64 void setDesktopBackground(in Element aElement, 65 in long aPosition, 66 in ACString aImageName); 67 68 /** 69 * Flags for positioning/sizing of the Desktop Background image. 70 */ 71 const long BACKGROUND_TILE = 1; 72 const long BACKGROUND_STRETCH = 2; 73 const long BACKGROUND_CENTER = 3; 74 const long BACKGROUND_FILL = 4; 75 const long BACKGROUND_FIT = 5; 76 77 /** 78 * The desktop background color, visible when no background image is 79 * used, or if the background image is centered and does not fill the 80 * entire screen. An RGB value (r << 16 | g << 8 | b) 81 */ 82 attribute unsigned long desktopBackgroundColor; 83 84 /** 85 * Opens an application with a specific URI to load. 86 * @param application 87 * The application file (or bundle directory, on OS X) 88 * @param uri 89 * The uri to be loaded by the application 90 */ 91 void openApplicationWithURI(in nsIFile aApplication, in ACString aURI); 92 93 /** 94 * The default system handler for web feeds 95 */ 96 readonly attribute nsIFile defaultFeedReader; 97}; 98 99