summaryrefslogtreecommitdiffstats
path: root/comm/suite/components/shell/nsIShellService.idl
blob: 9320fc6afb1df0fc8223b625ead98f5dec56b6b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/* -*- 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 http://mozilla.org/MPL/2.0/. */


#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;
};