Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/. */
6 #include "nsISupports.idl"
8 [scriptable, uuid(D5B61B82-1DA4-11d3-BF87-00105A1B0627)]
9 interface nsIController : nsISupports {
10 boolean isCommandEnabled(in string command);
11 boolean supportsCommand(in string command);
13 void doCommand(in string command);
15 void onEvent(in string eventName);
16 };
19 /*
21 Enhanced controller interface that allows for passing of parameters
22 to commands.
24 */
26 interface nsICommandParams;
28 [scriptable, uuid(EBE55080-C8A9-11D5-A73C-DD620D6E04BC)]
29 interface nsICommandController : nsISupports
30 {
32 void getCommandStateWithParams( in string command, in nsICommandParams aCommandParams);
34 void doCommandWithParams(in string command, in nsICommandParams aCommandParams);
36 };
39 /*
40 An API for registering commands in groups, to allow for
41 updating via nsIDOMWindow::UpdateCommands.
42 */
43 interface nsISimpleEnumerator;
45 [scriptable, uuid(9F82C404-1C7B-11D5-A73C-ECA43CA836FC)]
46 interface nsIControllerCommandGroup : nsISupports
47 {
49 void addCommandToGroup(in string aCommand, in string aGroup);
50 void removeCommandFromGroup(in string aCommand, in string aGroup);
52 boolean isCommandInGroup(in string aCommand, in string aGroup);
54 /*
55 We should expose some methods that allow for enumeration.
56 */
57 nsISimpleEnumerator getGroupsEnumerator();
59 nsISimpleEnumerator getEnumeratorForGroup(in string aGroup);
61 };