michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "domstubs.idl" michael@0: michael@0: interface nsIBrowserDOMWindow; michael@0: interface nsIDOMElement; michael@0: interface nsIDOMEvent; michael@0: interface nsIMessageBroadcaster; michael@0: michael@0: [scriptable, uuid(0c10226f-8abb-4345-aa6b-2780a6f4687e)] michael@0: interface nsIDOMChromeWindow : nsISupports michael@0: { michael@0: const unsigned short STATE_MAXIMIZED = 1; michael@0: const unsigned short STATE_MINIMIZED = 2; michael@0: const unsigned short STATE_NORMAL = 3; michael@0: const unsigned short STATE_FULLSCREEN = 4; michael@0: michael@0: readonly attribute unsigned short windowState; michael@0: michael@0: /** michael@0: * browserDOMWindow provides access to yet another layer of michael@0: * utility functions implemented by chrome script. It will be null michael@0: * for DOMWindows not corresponding to browsers. michael@0: */ michael@0: attribute nsIBrowserDOMWindow browserDOMWindow; michael@0: michael@0: void getAttention(); michael@0: michael@0: void getAttentionWithCycleCount(in long aCycleCount); michael@0: michael@0: void setCursor(in DOMString cursor); michael@0: michael@0: void maximize(); michael@0: void minimize(); michael@0: void restore(); michael@0: michael@0: /** michael@0: * Notify a default button is loaded on a dialog or a wizard. michael@0: * defaultButton is the default button. michael@0: */ michael@0: void notifyDefaultButtonLoaded(in nsIDOMElement defaultButton); michael@0: michael@0: readonly attribute nsIMessageBroadcaster messageManager; michael@0: michael@0: /** michael@0: * On some operating systems, we must allow the window manager to michael@0: * handle window dragging. This function tells the window manager to michael@0: * start dragging the window. This function will fail unless called michael@0: * while the left mouse button is held down, callers must check this. michael@0: * michael@0: * The optional panel argument should be set when moving a panel. michael@0: * michael@0: * Returns NS_ERROR_NOT_IMPLEMENTED (and thus throws in JS) if the OS michael@0: * doesn't support this. michael@0: */ michael@0: void beginWindowMove(in nsIDOMEvent mouseDownEvent, [optional] in nsIDOMElement panel); michael@0: };