accessible/public/nsIAccessibleSelectable.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/public/nsIAccessibleSelectable.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,64 @@
     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 +
    1.11 +interface nsIAccessible;
    1.12 +interface nsIArray;
    1.13 +
    1.14 +/**
    1.15 + * An accessibility interface for selectable widgets.
    1.16 + */
    1.17 +[scriptable, uuid(3e507fc4-4fcc-4223-a674-a095f591eba1)]
    1.18 +interface nsIAccessibleSelectable : nsISupports
    1.19 +{
    1.20 +  /**
    1.21 +   * Return an nsIArray of selected items within the widget.
    1.22 +   */
    1.23 +  readonly attribute nsIArray selectedItems;
    1.24 +
    1.25 +  /**
    1.26 +   * Return the number of currently selected items.
    1.27 +   */
    1.28 +  readonly attribute unsigned long selectedItemCount;
    1.29 +
    1.30 +  /**
    1.31 +   * Return a nth selected item within the widget.
    1.32 +   */
    1.33 +  nsIAccessible getSelectedItemAt(in unsigned long index);
    1.34 +
    1.35 +  /**
    1.36 +   * Return true if the given item is selected.
    1.37 +   */
    1.38 +  [binaryname(ScriptableIsItemSelected)]
    1.39 +  boolean isItemSelected(in unsigned long index);
    1.40 +
    1.41 +  /**
    1.42 +   * Adds the specified item to the widget's selection.
    1.43 +   */
    1.44 +  [binaryname(ScriptableAddItemToSelection)]
    1.45 +  void addItemToSelection(in unsigned long index);
    1.46 +
    1.47 +  /**
    1.48 +   * Removes the specified item from the widget's selection.
    1.49 +   */
    1.50 +  [binaryname(ScriptableRemoveItemFromSelection)]
    1.51 +  void removeItemFromSelection(in unsigned long index);
    1.52 +
    1.53 +  /**
    1.54 +   * Select all items.
    1.55 +   *
    1.56 +   * @return false if the object does not accept multiple selection,
    1.57 +   *         otherwise true.
    1.58 +   */
    1.59 +  [binaryname(ScriptableSelectAll)]
    1.60 +  boolean selectAll();
    1.61 +
    1.62 +  /**
    1.63 +   * Unselect all items.
    1.64 +   */
    1.65 +  [binaryname(ScriptableUnselectAll)]
    1.66 +  void unselectAll();
    1.67 +};

mercurial