accessible/public/nsIAccessibleSelectable.idl

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:e028d4ddf18c
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/. */
5
6 #include "nsISupports.idl"
7
8 interface nsIAccessible;
9 interface nsIArray;
10
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;
21
22 /**
23 * Return the number of currently selected items.
24 */
25 readonly attribute unsigned long selectedItemCount;
26
27 /**
28 * Return a nth selected item within the widget.
29 */
30 nsIAccessible getSelectedItemAt(in unsigned long index);
31
32 /**
33 * Return true if the given item is selected.
34 */
35 [binaryname(ScriptableIsItemSelected)]
36 boolean isItemSelected(in unsigned long index);
37
38 /**
39 * Adds the specified item to the widget's selection.
40 */
41 [binaryname(ScriptableAddItemToSelection)]
42 void addItemToSelection(in unsigned long index);
43
44 /**
45 * Removes the specified item from the widget's selection.
46 */
47 [binaryname(ScriptableRemoveItemFromSelection)]
48 void removeItemFromSelection(in unsigned long index);
49
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();
58
59 /**
60 * Unselect all items.
61 */
62 [binaryname(ScriptableUnselectAll)]
63 void unselectAll();
64 };

mercurial