content/xul/document/public/nsIController.idl

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:9acff85e6d48
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/. */
5
6 #include "nsISupports.idl"
7
8 [scriptable, uuid(D5B61B82-1DA4-11d3-BF87-00105A1B0627)]
9 interface nsIController : nsISupports {
10 boolean isCommandEnabled(in string command);
11 boolean supportsCommand(in string command);
12
13 void doCommand(in string command);
14
15 void onEvent(in string eventName);
16 };
17
18
19 /*
20
21 Enhanced controller interface that allows for passing of parameters
22 to commands.
23
24 */
25
26 interface nsICommandParams;
27
28 [scriptable, uuid(EBE55080-C8A9-11D5-A73C-DD620D6E04BC)]
29 interface nsICommandController : nsISupports
30 {
31
32 void getCommandStateWithParams( in string command, in nsICommandParams aCommandParams);
33
34 void doCommandWithParams(in string command, in nsICommandParams aCommandParams);
35
36 };
37
38
39 /*
40 An API for registering commands in groups, to allow for
41 updating via nsIDOMWindow::UpdateCommands.
42 */
43 interface nsISimpleEnumerator;
44
45 [scriptable, uuid(9F82C404-1C7B-11D5-A73C-ECA43CA836FC)]
46 interface nsIControllerCommandGroup : nsISupports
47 {
48
49 void addCommandToGroup(in string aCommand, in string aGroup);
50 void removeCommandFromGroup(in string aCommand, in string aGroup);
51
52 boolean isCommandInGroup(in string aCommand, in string aGroup);
53
54 /*
55 We should expose some methods that allow for enumeration.
56 */
57 nsISimpleEnumerator getGroupsEnumerator();
58
59 nsISimpleEnumerator getEnumeratorForGroup(in string aGroup);
60
61 };
62

mercurial