1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 *
3 * ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
10 *
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
15 *
16 * The Original Code is the Mozilla browser.
17 *
18 * The Initial Developer of the Original Code is
19 * Netscape Communications Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 1999
21 * the Initial Developer. All Rights Reserved.
22 *
23 * Contributor(s):
24 * pav
25 * Blake Ross (blaker@netscape.com)
26 * Benjamin Smedberg <bsmedberg@covad.net>
27 *
28 * Alternatively, the contents of this file may be used under the terms of
29 * either of the GNU General Public License Version 2 or later (the "GPL"),
30 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
31 * in which case the provisions of the GPL or the LGPL are applicable instead
32 * of those above. If you wish to allow use of your version of this file only
33 * under the terms of either the GPL or the LGPL, and not to allow others to
34 * use your version of this file under the terms of the MPL, indicate your
35 * decision by deleting the provisions above and replace them with the notice
36 * and other provisions required by the GPL or the LGPL. If you do not delete
37 * the provisions above, a recipient may use your version of this file under
38 * the terms of any one of the MPL, the GPL or the LGPL.
39 *
40 * ***** END LICENSE BLOCK ***** */
41
42 #include "nsISupports.idl"
43 #include "nsIChromeRegistry.idl"
44
45 [scriptable, uuid(382370d0-a7cd-47ae-aa4e-af74f5edf652)]
46 interface nsIChromeRegistrySea : nsIXULChromeRegistry
47 {
48 /* Applies a skin or locale to all possible packages */
49 void selectSkin(in ACString skinName, in boolean useProfile);
50 void selectLocale(in ACString localeName, in boolean useProfile);
51 void deselectSkin(in ACString skinName, in boolean useProfile);
52 void deselectLocale(in ACString localeName, in boolean useProfile);
53 PRInt32 isSkinSelected(in ACString skinName, in boolean useProfile);
54 PRInt32 isLocaleSelected(in ACString localeName, in boolean useProfile);
55
56 //Special additional APIs for locales and skin.
57 void selectLocaleForProfile(in ACString localeName, in wstring profilePath);
58 void selectSkinForProfile(in ACString skinName, in wstring profilePath);
59
60 /* runtimeProvider == true: don't assert the runtime change */
61 void setRuntimeProvider(in boolean runtimeProvider);
62
63 boolean checkThemeVersion(in ACString skinName);
64 boolean checkLocaleVersion(in ACString localeName);
65
66 /* Apply skin/locale to a specific package */
67 void selectSkinForPackage(in ACString skinName,
68 in wstring packageName,
69 in boolean useProfile);
70
71 void selectLocaleForPackage(in ACString localeName,
72 in wstring packageName,
73 in boolean useProfile);
74
75 void deselectSkinForPackage(in ACString skinName,
76 in wstring packageName,
77 in boolean useProfile);
78
79 void deselectLocaleForPackage(in ACString localeName,
80 in wstring packageName,
81 in boolean useProfile);
82
83 boolean isSkinSelectedForPackage(in ACString skinName,
84 in wstring packageName,
85 in boolean useProfile);
86
87 boolean isLocaleSelectedForPackage(in ACString localeName,
88 in wstring packageName,
89 in boolean useProfile);
90
91 ACString getSelectedSkin(in ACString packageName);
92
93 /* Installation APIs */
94 void installSkin(in string baseURL,
95 in boolean useProfile,
96 in boolean allowScripts);
97
98 void uninstallSkin(in ACString skinName, in boolean useProfile);
99
100 void installLocale(in string baseURL, in boolean useProfile);
101 void uninstallLocale(in ACString localeName, in boolean useProfile);
102
103 void installPackage(in string baseURL, in boolean useProfile);
104 void uninstallPackage(in ACString packageName, in boolean useProfile);
105
106 /* Whether or not an addon package can dynamically overlay another package.
107 You can use these APIs to effectively disable a chrome add-on without
108 uninstalling it. */
109 void setAllowOverlaysForPackage(in wstring packageName, in boolean allowOverlays);
110 };