2001-06-30 00:25:09 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2001-06-30 00:25:09 +00:00
|
|
|
#include "nsISupports.idl"
|
|
|
|
#include "nsIAccessible.idl"
|
2003-07-22 14:55:22 +00:00
|
|
|
#include "nsIArray.idl"
|
2001-06-30 00:25:09 +00:00
|
|
|
|
2003-07-22 14:55:22 +00:00
|
|
|
/**
|
|
|
|
* An interface for the accessibility module and in-process accessibility clients
|
|
|
|
* for dealing with getting and changing the selection of accessible nodes.
|
|
|
|
*/
|
2001-06-30 00:25:09 +00:00
|
|
|
[scriptable, uuid(34d268d6-1dd2-11b2-9d63-83a5e0ada290)]
|
|
|
|
interface nsIAccessibleSelectable : nsISupports
|
|
|
|
{
|
2006-04-24 14:10:39 +00:00
|
|
|
const unsigned long eSelection_Add = 0;
|
|
|
|
const unsigned long eSelection_Remove = 1;
|
|
|
|
const unsigned long eSelection_GetState = 2;
|
|
|
|
|
2003-07-22 14:55:22 +00:00
|
|
|
/**
|
|
|
|
* Return an nsIArray of selected nsIAccessible children
|
|
|
|
*/
|
|
|
|
nsIArray GetSelectedChildren();
|
2002-06-12 05:16:30 +00:00
|
|
|
|
|
|
|
/**
|
2003-07-22 14:55:22 +00:00
|
|
|
* Returns the number of accessible children currently selected.
|
|
|
|
*/
|
2002-06-12 05:16:30 +00:00
|
|
|
readonly attribute long selectionCount;
|
|
|
|
|
|
|
|
/**
|
2003-07-22 14:55:22 +00:00
|
|
|
* Adds the specified accessible child of the object to the
|
|
|
|
* object's selection.
|
|
|
|
* If the specified object is already selected, then it does nothing.
|
|
|
|
* @throws NS_ERROR_FAILURE if the specified object is not selectable.
|
|
|
|
*/
|
2003-07-31 08:09:39 +00:00
|
|
|
void addChildToSelection(in long index);
|
2002-06-12 05:16:30 +00:00
|
|
|
|
|
|
|
/**
|
2003-07-22 14:55:22 +00:00
|
|
|
* Removes the specified child of the object from the object's selection.
|
|
|
|
* If the specified object was not selected, then it does nothing.
|
|
|
|
* @throws NS_ERROR_FAILURE if the specified object is not selectable.
|
|
|
|
*/
|
2003-07-31 08:09:39 +00:00
|
|
|
void removeChildFromSelection(in long index);
|
2002-06-12 05:16:30 +00:00
|
|
|
|
|
|
|
/**
|
2003-07-22 14:55:22 +00:00
|
|
|
* Clears the selection in the object so that no children in the object
|
|
|
|
* are selected.
|
|
|
|
*/
|
2002-06-12 05:16:30 +00:00
|
|
|
void clearSelection();
|
|
|
|
|
|
|
|
/**
|
2003-07-22 14:55:22 +00:00
|
|
|
* Returns a reference to the accessible object representing the specified
|
|
|
|
* selected child of the object.
|
|
|
|
* @param index Zero-based selected accessible child index
|
|
|
|
* @return The nth selected accessible child
|
|
|
|
*/
|
2002-06-12 05:16:30 +00:00
|
|
|
nsIAccessible refSelection(in long index);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Determines if the current child of this object is selected
|
2003-07-22 14:55:22 +00:00
|
|
|
* @param The zero-based accessible child index
|
|
|
|
* @return Returns true if the child is selected, false if not.
|
2002-06-12 05:16:30 +00:00
|
|
|
*/
|
|
|
|
boolean isChildSelected(in long index);
|
|
|
|
|
|
|
|
/**
|
2003-07-22 14:55:22 +00:00
|
|
|
* Select all children
|
|
|
|
* @return If the object does not accept multiple selection, return false.
|
|
|
|
* Otherwise, returns true.
|
|
|
|
*/
|
2002-06-12 05:16:30 +00:00
|
|
|
boolean selectAllSelection();
|
2001-06-30 00:25:09 +00:00
|
|
|
};
|