embedding/components/commandhandler/public/nsIControllerCommand.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     2  *
     3  * This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #include "nsISupports.idl"
     8 #include "nsICommandParams.idl"
    10 /**
    11  * nsIControllerCommand
    12  *
    13  * A generic command interface. You can register an nsIControllerCommand
    14  * with the nsIControllerCommandTable.
    15  */
    17 [scriptable, uuid(0eae9a46-1dd2-11b2-aca0-9176f05fe9db)]
    18 interface nsIControllerCommand : nsISupports
    19 {
    21   /**
    22    * Returns true if the command is currently enabled. An nsIControllerCommand
    23    * can implement more than one commands; say, a group of related commands
    24    * (e.g. delete left/delete right). Because of this, the command name is
    25    * passed to each method.
    26    *
    27    * @param aCommandName  the name of the command for which we want the enabled
    28    *                      state.
    29    * @param aCommandContext    a cookie held by the nsIControllerCommandTable,
    30    *                  allowing the command to get some context information.
    31    *                  The contents of this cookie are implementation-defined.
    32    */
    33   boolean isCommandEnabled(in string aCommandName, in nsISupports aCommandContext);
    35   void getCommandStateParams(in string aCommandName, in nsICommandParams aParams, in nsISupports aCommandContext);
    37   /**
    38    * Execute the name command.
    39    *
    40    * @param aCommandName  the name of the command to execute.
    41    * 
    42    * @param aCommandContext    a cookie held by the nsIControllerCommandTable,
    43    *                  allowing the command to get some context information.
    44    *                  The contents of this cookie are implementation-defined.
    45    */
    46   void    doCommand(in string aCommandName, in nsISupports aCommandContext);
    48   void    doCommandParams(in string aCommandName, in nsICommandParams aParams, in nsISupports aCommandContext);
    50 };

mercurial