|
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
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 "domstubs.idl" |
|
7 |
|
8 interface nsIBrowserDOMWindow; |
|
9 interface nsIDOMElement; |
|
10 interface nsIDOMEvent; |
|
11 interface nsIMessageBroadcaster; |
|
12 |
|
13 [scriptable, uuid(0c10226f-8abb-4345-aa6b-2780a6f4687e)] |
|
14 interface nsIDOMChromeWindow : nsISupports |
|
15 { |
|
16 const unsigned short STATE_MAXIMIZED = 1; |
|
17 const unsigned short STATE_MINIMIZED = 2; |
|
18 const unsigned short STATE_NORMAL = 3; |
|
19 const unsigned short STATE_FULLSCREEN = 4; |
|
20 |
|
21 readonly attribute unsigned short windowState; |
|
22 |
|
23 /** |
|
24 * browserDOMWindow provides access to yet another layer of |
|
25 * utility functions implemented by chrome script. It will be null |
|
26 * for DOMWindows not corresponding to browsers. |
|
27 */ |
|
28 attribute nsIBrowserDOMWindow browserDOMWindow; |
|
29 |
|
30 void getAttention(); |
|
31 |
|
32 void getAttentionWithCycleCount(in long aCycleCount); |
|
33 |
|
34 void setCursor(in DOMString cursor); |
|
35 |
|
36 void maximize(); |
|
37 void minimize(); |
|
38 void restore(); |
|
39 |
|
40 /** |
|
41 * Notify a default button is loaded on a dialog or a wizard. |
|
42 * defaultButton is the default button. |
|
43 */ |
|
44 void notifyDefaultButtonLoaded(in nsIDOMElement defaultButton); |
|
45 |
|
46 readonly attribute nsIMessageBroadcaster messageManager; |
|
47 |
|
48 /** |
|
49 * On some operating systems, we must allow the window manager to |
|
50 * handle window dragging. This function tells the window manager to |
|
51 * start dragging the window. This function will fail unless called |
|
52 * while the left mouse button is held down, callers must check this. |
|
53 * |
|
54 * The optional panel argument should be set when moving a panel. |
|
55 * |
|
56 * Returns NS_ERROR_NOT_IMPLEMENTED (and thus throws in JS) if the OS |
|
57 * doesn't support this. |
|
58 */ |
|
59 void beginWindowMove(in nsIDOMEvent mouseDownEvent, [optional] in nsIDOMElement panel); |
|
60 }; |