michael@0: /* -*- Mode: C++; 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 "nsISupports.idl" michael@0: #include "nsIControllerCommandTable.idl" michael@0: michael@0: [scriptable, uuid(47B82B60-A36F-4167-8072-6F421151ED50)] michael@0: interface nsIControllerContext : nsISupports michael@0: { michael@0: michael@0: /** michael@0: * Init the controller, optionally passing a controller michael@0: * command table. michael@0: * michael@0: * @param aCommandTable a command table, used internally michael@0: * by this controller. May be null, in michael@0: * which case the controller will create michael@0: * a new, empty table. michael@0: */ michael@0: void init(in nsIControllerCommandTable aCommandTable); michael@0: michael@0: /** michael@0: * Set a context on this controller, which is passed michael@0: * to commands to give them some context when they execute. michael@0: * michael@0: * @param aCommandContext the context passed to commands. michael@0: * Note that this is *not* addreffed by the michael@0: * controller, and so needs to outlive it, michael@0: * or be nulled out. michael@0: */ michael@0: void setCommandContext(in nsISupports aCommandContext); michael@0: michael@0: };