1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/embedding/components/commandhandler/public/nsIControllerContext.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,35 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsISupports.idl" 1.10 +#include "nsIControllerCommandTable.idl" 1.11 + 1.12 +[scriptable, uuid(47B82B60-A36F-4167-8072-6F421151ED50)] 1.13 +interface nsIControllerContext : nsISupports 1.14 +{ 1.15 + 1.16 + /** 1.17 + * Init the controller, optionally passing a controller 1.18 + * command table. 1.19 + * 1.20 + * @param aCommandTable a command table, used internally 1.21 + * by this controller. May be null, in 1.22 + * which case the controller will create 1.23 + * a new, empty table. 1.24 + */ 1.25 + void init(in nsIControllerCommandTable aCommandTable); 1.26 + 1.27 + /** 1.28 + * Set a context on this controller, which is passed 1.29 + * to commands to give them some context when they execute. 1.30 + * 1.31 + * @param aCommandContext the context passed to commands. 1.32 + * Note that this is *not* addreffed by the 1.33 + * controller, and so needs to outlive it, 1.34 + * or be nulled out. 1.35 + */ 1.36 + void setCommandContext(in nsISupports aCommandContext); 1.37 + 1.38 +};