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)] 9interface nsIController : nsISupports { 10 boolean isCommandEnabled(in string command); 11 boolean supportsCommand(in string command); 12 13 [can_run_script] 14 void doCommand(in string command); 15 16 void onEvent(in string eventName); 17}; 18 19 20/* 21 22 Enhanced controller interface that allows for passing of parameters 23 to commands. 24 25*/ 26 27interface nsICommandParams; 28 29[scriptable, uuid(EEC0B435-7F53-44FE-B00A-CF3EED65C01A)] 30interface nsICommandController : nsISupports 31{ 32 33 void getCommandStateWithParams( in string command, in nsICommandParams aCommandParams); 34 35 [can_run_script] 36 void doCommandWithParams(in string command, in nsICommandParams aCommandParams); 37 38 Array<ACString> getSupportedCommands(); 39}; 40