Thu, 22 Jan 2015 13:21:57 +0100
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 /* 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/. */
6 #include "nsISupports.idl"
8 interface nsIAccessible;
9 interface nsIArray;
11 /**
12 * An accessibility interface for selectable widgets.
13 */
14 [scriptable, uuid(3e507fc4-4fcc-4223-a674-a095f591eba1)]
15 interface nsIAccessibleSelectable : nsISupports
16 {
17 /**
18 * Return an nsIArray of selected items within the widget.
19 */
20 readonly attribute nsIArray selectedItems;
22 /**
23 * Return the number of currently selected items.
24 */
25 readonly attribute unsigned long selectedItemCount;
27 /**
28 * Return a nth selected item within the widget.
29 */
30 nsIAccessible getSelectedItemAt(in unsigned long index);
32 /**
33 * Return true if the given item is selected.
34 */
35 [binaryname(ScriptableIsItemSelected)]
36 boolean isItemSelected(in unsigned long index);
38 /**
39 * Adds the specified item to the widget's selection.
40 */
41 [binaryname(ScriptableAddItemToSelection)]
42 void addItemToSelection(in unsigned long index);
44 /**
45 * Removes the specified item from the widget's selection.
46 */
47 [binaryname(ScriptableRemoveItemFromSelection)]
48 void removeItemFromSelection(in unsigned long index);
50 /**
51 * Select all items.
52 *
53 * @return false if the object does not accept multiple selection,
54 * otherwise true.
55 */
56 [binaryname(ScriptableSelectAll)]
57 boolean selectAll();
59 /**
60 * Unselect all items.
61 */
62 [binaryname(ScriptableUnselectAll)]
63 void unselectAll();
64 };