author Ian Neal <>
Sun, 11 Nov 2018 18:05:59 +0100
changeset 33694 46594970c9a26d02610c6fe3ee13834f1f124c2a
parent 32957 886ca0e44c5a6e57df647b4f4379122b89acb7f1
permissions -rw-r--r--
Bug 1475865 - Port Bug 1119088 [Set As Desktop Background does not work on OS X] to SeaMonkey. r=stefanh

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at */

#include "nsISupports.idl"

interface nsIFile;

webidl Element;

[scriptable, uuid(d7a19d24-9c98-4f88-b11e-52fa8c39ceea)]
interface nsIShellService : nsISupports
   * app types we can be registered to handle
  const unsigned short BROWSER = 0x0001;
  const unsigned short MAIL    = 0x0002;
  const unsigned short NEWS    = 0x0004;
  const unsigned short RSS     = 0x0008;

   * Determines whether or not SeaMonkey is the "Default Client" for the
   * passed in app type.
   * This is simply whether or not SeaMonkey is registered to handle
   * the url schemes associated with the app.
   * @param aStartupCheck true if this is the check being performed
   *                      by the first window at startup,
   *                      false otherwise.
   * @param aApps the application types being tested (Browser, Mail, News, RSS)
  boolean isDefaultClient(in boolean aStartupCheck, in unsigned short aApps);

   * Registers SeaMonkey as the "Default Client" for the
   * passed in app types.
   * @param aForAllUsers   Whether or not SeaMonkey should attempt
   *                       to become the default client for all
   *                       users on a multi-user system.
   * @param aClaimAllTypes Register SeaMonkey as the handler for
   *                       additional protocols (ftp, chrome etc)
   *                       and web documents (.html, .xhtml etc).
   * @param aApps the application types being tested (Mail, News, Browser, RSS)
  void setDefaultClient(in boolean aForAllUsers, in boolean aClaimAllTypes, in unsigned short aApps);

   * Sets the desktop background image using either the HTML <IMG>
   * element supplied or the background image of the element supplied.
   * @param aImageElement Either a HTML <IMG> element or an element with
   *                      a background image from which to source the
   *                      background image.
   * @param aPosition     How to place the image on the desktop
   * @param aImageName    The image name. Equivalent to the leaf name of the
   *                      location.href.

  void setDesktopBackground(in Element aElement,
                            in long aPosition,
                            in ACString aImageName);

   * Flags for positioning/sizing of the Desktop Background image.
  const long BACKGROUND_TILE      = 1;
  const long BACKGROUND_STRETCH   = 2;
  const long BACKGROUND_CENTER    = 3;
  const long BACKGROUND_FILL      = 4;
  const long BACKGROUND_FIT       = 5;

   * 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. An RGB value (r << 16 | g << 8 | b)
  attribute unsigned long desktopBackgroundColor;

   * Opens an application with a specific URI to load.
   * @param   application
   *          The application file (or bundle directory, on OS X)
   * @param   uri
   *          The uri to be loaded by the application
  void openApplicationWithURI(in nsIFile aApplication, in ACString aURI);

   * The default system handler for web feeds
  readonly attribute nsIFile defaultFeedReader;