browser/components/shell/public/nsIShellService.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #include "nsISupports.idl"
michael@0 7
michael@0 8 interface nsIDOMElement;
michael@0 9 interface nsIFile;
michael@0 10
michael@0 11 [scriptable, uuid(99d2e9f1-3c86-40f7-81fd-3060c18489f0)]
michael@0 12 interface nsIShellService : nsISupports
michael@0 13 {
michael@0 14 /**
michael@0 15 * Determines whether or not Firefox is the "Default Browser."
michael@0 16 * This is simply whether or not Firefox is registered to handle
michael@0 17 * http links.
michael@0 18 *
michael@0 19 * @param aStartupCheck true if this is the check being performed
michael@0 20 * by the first browser window at startup,
michael@0 21 * false otherwise.
michael@0 22 * @param aForAllTypes true if the check should be made for HTTP and HTML.
michael@0 23 * false if the check should be made for HTTP only.
michael@0 24 * This parameter may be ignored on some platforms.
michael@0 25 */
michael@0 26 boolean isDefaultBrowser(in boolean aStartupCheck,
michael@0 27 [optional] in boolean aForAllTypes);
michael@0 28
michael@0 29 /**
michael@0 30 * Registers Firefox as the "Default Browser."
michael@0 31 *
michael@0 32 * @param aClaimAllTypes Register Firefox as the handler for
michael@0 33 * additional protocols (ftp, chrome etc)
michael@0 34 * and web documents (.html, .xhtml etc).
michael@0 35 * @param aForAllUsers Whether or not Firefox should attempt
michael@0 36 * to become the default browser for all
michael@0 37 * users on a multi-user system.
michael@0 38 */
michael@0 39 void setDefaultBrowser(in boolean aClaimAllTypes, in boolean aForAllUsers);
michael@0 40
michael@0 41 /**
michael@0 42 * Used to determine whether or not to show a "Set Default Browser"
michael@0 43 * query dialog. This attribute is true if the application is starting
michael@0 44 * up and "browser.shell.checkDefaultBrowser" is true, otherwise it
michael@0 45 * is false.
michael@0 46 */
michael@0 47 attribute boolean shouldCheckDefaultBrowser;
michael@0 48
michael@0 49 /**
michael@0 50 * Used to determine whether or not to offer "Set as desktop background"
michael@0 51 * functionality. Even if shell service is available it is not
michael@0 52 * guaranteed that it is able to set the background for every desktop
michael@0 53 * which is especially true for Linux with its many different desktop
michael@0 54 * environments.
michael@0 55 */
michael@0 56 readonly attribute boolean canSetDesktopBackground;
michael@0 57
michael@0 58 /**
michael@0 59 * Flags for positioning/sizing of the Desktop Background image.
michael@0 60 */
michael@0 61 const long BACKGROUND_TILE = 1;
michael@0 62 const long BACKGROUND_STRETCH = 2;
michael@0 63 const long BACKGROUND_CENTER = 3;
michael@0 64 const long BACKGROUND_FILL = 4;
michael@0 65 const long BACKGROUND_FIT = 5;
michael@0 66
michael@0 67 /**
michael@0 68 * Sets the desktop background image using either the HTML <IMG>
michael@0 69 * element supplied or the background image of the element supplied.
michael@0 70 *
michael@0 71 * @param aImageElement Either a HTML <IMG> element or an element with
michael@0 72 * a background image from which to source the
michael@0 73 * background image.
michael@0 74 * @param aPosition How to place the image on the desktop
michael@0 75 */
michael@0 76 void setDesktopBackground(in nsIDOMElement aElement, in long aPosition);
michael@0 77
michael@0 78 /**
michael@0 79 * Constants identifying applications that can be opened with
michael@0 80 * openApplication.
michael@0 81 */
michael@0 82 const long APPLICATION_MAIL = 0;
michael@0 83 const long APPLICATION_NEWS = 1;
michael@0 84
michael@0 85 /**
michael@0 86 * Opens the application specified. If more than one application of the
michael@0 87 * given type is available on the system, the default or "preferred"
michael@0 88 * application is used.
michael@0 89 */
michael@0 90 void openApplication(in long aApplication);
michael@0 91
michael@0 92 /**
michael@0 93 * The desktop background color, visible when no background image is
michael@0 94 * used, or if the background image is centered and does not fill the
michael@0 95 * entire screen. A rgb value, where (r << 16 | g << 8 | b)
michael@0 96 */
michael@0 97 attribute unsigned long desktopBackgroundColor;
michael@0 98
michael@0 99 /**
michael@0 100 * Opens an application with a specific URI to load.
michael@0 101 * @param application
michael@0 102 * The application file (or bundle directory, on OS X)
michael@0 103 * @param uri
michael@0 104 * The uri to be loaded by the application
michael@0 105 */
michael@0 106 void openApplicationWithURI(in nsIFile aApplication, in ACString aURI);
michael@0 107
michael@0 108 /**
michael@0 109 * The default system handler for web feeds
michael@0 110 */
michael@0 111 readonly attribute nsIFile defaultFeedReader;
michael@0 112 };

mercurial