2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
|
|
|
* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
|
|
|
*
|
|
|
|
* The Original Code is the Mozilla browser.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1999
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
* Paul Sandoz (paul.sandoz@sun.com)
|
|
|
|
* Bill Haneman (bill.haneman@sun.com)
|
|
|
|
* John Gaunt (jgaunt@netscape.com)
|
2009-09-10 18:07:56 -07:00
|
|
|
* Alexander Surkov <surkov.alexander@gmail.com>
|
2007-03-22 10:30:00 -07:00
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
|
|
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
interface nsIAccessible;
|
2009-09-10 18:07:56 -07:00
|
|
|
interface nsIArray;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2009-09-10 18:07:56 -07:00
|
|
|
[scriptable, uuid(035c0c0e-41e3-4985-8ad9-d9f14cdc667a)]
|
2007-03-22 10:30:00 -07:00
|
|
|
interface nsIAccessibleTable : nsISupports
|
|
|
|
{
|
2009-05-18 01:35:21 -07:00
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Return the caption accessible for the table. For example, html:caption
|
2009-05-18 01:35:21 -07:00
|
|
|
* element of html:table element.
|
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
readonly attribute nsIAccessible caption;
|
2009-05-18 01:35:21 -07:00
|
|
|
|
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Return summary description for the table. For example, @summary attribute
|
|
|
|
* on html:table element.
|
2009-05-18 01:35:21 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
readonly attribute AString summary;
|
2009-05-18 01:35:21 -07:00
|
|
|
|
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Return columns count in the table.
|
2009-05-18 01:35:21 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
readonly attribute long columnCount;
|
2009-05-18 01:35:21 -07:00
|
|
|
|
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Return rows count in the table.
|
2009-05-18 01:35:21 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
readonly attribute long rowCount;
|
2009-05-18 01:35:21 -07:00
|
|
|
|
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Return the accessible object at the specified row and column in the table.
|
2007-05-11 05:21:43 -07:00
|
|
|
* If both row and column index are valid then the corresponding accessible
|
|
|
|
* object is returned that represents the requested cell regardless of whether
|
|
|
|
* the cell is currently visible (on the screen).
|
|
|
|
*
|
2009-09-10 18:07:56 -07:00
|
|
|
* @param rowIndex [in] the row index to retrieve the cell at
|
|
|
|
* @param columnIndex [in] the column index to retrieve the cell at
|
2007-05-11 05:21:43 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
nsIAccessible getCellAt(in long rowIndex, in long columnIndex);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2007-07-11 09:08:34 -07:00
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Translate the given row and column indices into the corresponding cell
|
2007-07-11 09:08:34 -07:00
|
|
|
* index.
|
|
|
|
*
|
2009-09-10 18:07:56 -07:00
|
|
|
* @param rowIndex [in] the row index to return cell index at
|
|
|
|
* @param columnIndex [in] the column index to return cell index at
|
2007-07-11 09:08:34 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
long getCellIndexAt(in long rowIndex, in long columnIndex);
|
2007-07-11 09:08:34 -07:00
|
|
|
|
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Translate the given cell index into the corresponding column index.
|
2007-07-11 09:08:34 -07:00
|
|
|
*
|
2009-09-10 18:07:56 -07:00
|
|
|
* @param cellIndex [in] index of the table cell to return column index for
|
2007-07-11 09:08:34 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
long getColumnIndexAt(in long cellIndex);
|
2007-07-11 09:08:34 -07:00
|
|
|
|
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Translate the given cell index into the corresponding row index.
|
2007-07-11 09:08:34 -07:00
|
|
|
*
|
2009-09-10 18:07:56 -07:00
|
|
|
* @param cellIndex [in] index of the table cell to return row index for
|
2007-07-11 09:08:34 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
long getRowIndexAt(in long cellIndex);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2007-05-11 05:21:43 -07:00
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Return the number of columns occupied by the accessible cell at
|
|
|
|
* the specified row and column in the table. The result differs from 1 if
|
|
|
|
* the specified cell spans multiple columns.
|
2007-05-11 05:21:43 -07:00
|
|
|
*
|
2009-09-10 18:07:56 -07:00
|
|
|
* @param row [in] row index of the cell to return the column extent for
|
|
|
|
* @param column [in] column index of the cell to return the column extent
|
|
|
|
* for
|
2007-05-11 05:21:43 -07:00
|
|
|
*/
|
|
|
|
long getColumnExtentAt(in long row, in long column);
|
|
|
|
|
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Return the number of rows occupied by the accessible cell at the specified
|
|
|
|
* row and column in the table. The result differs from 1 if the specified
|
|
|
|
* cell spans multiple rows.
|
2007-05-11 05:21:43 -07:00
|
|
|
*
|
2009-09-10 18:07:56 -07:00
|
|
|
* @param row [in] row index of the cell to return the column extent for
|
|
|
|
* @param column [in] column index of the cell to return the column extent
|
|
|
|
* for
|
2007-05-11 05:21:43 -07:00
|
|
|
*/
|
|
|
|
long getRowExtentAt(in long row, in long column);
|
|
|
|
|
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Return the description text of the specified column in the table.
|
|
|
|
*
|
|
|
|
* @param columnIndex [in] the column index to retrieve description for
|
2007-05-11 05:21:43 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
AString getColumnDescription(in long columnIndex);
|
2007-05-11 05:21:43 -07:00
|
|
|
|
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Return the description text of the specified row in the table.
|
|
|
|
*
|
|
|
|
* @param rowIndex [in] the row index to retrieve description for
|
2007-05-11 05:21:43 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
AString getRowDescription(in long rowIndex);
|
2007-05-11 05:21:43 -07:00
|
|
|
|
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Return a boolean value indicating whether the specified column is
|
|
|
|
* selected, i.e. all cells within the column are selected.
|
2007-05-11 05:21:43 -07:00
|
|
|
*
|
2009-09-10 18:07:56 -07:00
|
|
|
* @param columnIndex [in] the column index to determine if it's selected
|
2007-05-11 05:21:43 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
boolean isColumnSelected(in long columnIndex);
|
2007-05-11 05:21:43 -07:00
|
|
|
|
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Return a boolean value indicating whether the specified row is selected,
|
|
|
|
* i.e. all cells within the row are selected.
|
2007-05-11 05:21:43 -07:00
|
|
|
*
|
2009-09-10 18:07:56 -07:00
|
|
|
* @param rowIndex [in] the row index to determine whether it's selected
|
2007-05-11 05:21:43 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
boolean isRowSelected(in long rowIndex);
|
2007-05-11 05:21:43 -07:00
|
|
|
|
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Return a boolean value indicating whether the specified cell is selected.
|
2007-05-11 05:21:43 -07:00
|
|
|
*
|
2009-09-10 18:07:56 -07:00
|
|
|
* @param rowIndex [in] the row index of the cell
|
|
|
|
* @param columnIndex [in] the column index of the cell
|
2007-05-11 05:21:43 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
boolean isCellSelected(in long rowIndex, in long columnIndex);
|
2007-05-11 05:21:43 -07:00
|
|
|
|
2007-07-11 09:08:34 -07:00
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Return the total number of selected cells.
|
2007-07-11 09:08:34 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
readonly attribute unsigned long selectedCellCount;
|
2007-07-11 09:08:34 -07:00
|
|
|
|
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Return the total number of selected columns.
|
2007-07-11 09:08:34 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
readonly attribute unsigned long selectedColumnCount;
|
2007-07-11 09:08:34 -07:00
|
|
|
|
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Return the total number of selected rows.
|
2007-07-11 09:08:34 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
readonly attribute unsigned long selectedRowCount;
|
2007-07-11 09:08:34 -07:00
|
|
|
|
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Return an array of selected cells.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIArray selectedCells;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return an array of cell indices currently selected.
|
2007-07-11 09:08:34 -07:00
|
|
|
*
|
2009-09-10 18:07:56 -07:00
|
|
|
* @param cellsArraySize [in] length of array
|
|
|
|
* @param cellsArray [in] array of indexes of selected cells
|
2007-07-11 09:08:34 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
void getSelectedCellIndices(out unsigned long cellsArraySize,
|
|
|
|
[retval, array, size_is(cellsArraySize)] out long cellsArray);
|
2007-07-11 09:08:34 -07:00
|
|
|
|
2007-05-11 05:21:43 -07:00
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Return an array of column indices currently selected.
|
2007-05-11 05:21:43 -07:00
|
|
|
*
|
2009-09-10 18:07:56 -07:00
|
|
|
* @param columnsArraySize [in] length of array
|
|
|
|
* @param columnsArray [in] array of indices of selected columns
|
2007-05-11 05:21:43 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
void getSelectedColumnIndices(out unsigned long columnsArraySize,
|
|
|
|
[retval, array, size_is(columnsArraySize)] out long columnsArray);
|
2007-05-11 05:21:43 -07:00
|
|
|
|
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Return an array of row indices currently selected.
|
2007-05-11 05:21:43 -07:00
|
|
|
*
|
2009-09-10 18:07:56 -07:00
|
|
|
* @param rowsArraySize [in] Length of array
|
|
|
|
* @param rowsArray [in] array of indices of selected rows
|
2007-05-11 05:21:43 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
void getSelectedRowIndices(out unsigned long rowsArraySize,
|
|
|
|
[retval, array, size_is(rowsArraySize)] out long rowsArray);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2007-05-11 05:21:43 -07:00
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Select a row and unselects all previously selected rows.
|
2007-05-11 05:21:43 -07:00
|
|
|
*
|
2009-09-10 18:07:56 -07:00
|
|
|
* @param rowIndex [in] the row index to select
|
2007-05-11 05:21:43 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
void selectRow(in long rowIndex);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Select a column and unselects all previously selected columns.
|
2007-05-11 05:21:43 -07:00
|
|
|
*
|
2009-09-10 18:07:56 -07:00
|
|
|
* @param columnIndex [in] the column index to select
|
2007-05-11 05:21:43 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
void selectColumn(in long columnIndex);
|
2007-05-11 05:21:43 -07:00
|
|
|
|
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Unselect the given row, leaving other selected rows selected (if any).
|
2007-05-11 05:21:43 -07:00
|
|
|
*
|
2009-09-10 18:07:56 -07:00
|
|
|
* @param rowIndex [in] the row index to select
|
2007-05-11 05:21:43 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
void unselectRow(in long rowIndex);
|
2007-05-11 05:21:43 -07:00
|
|
|
|
|
|
|
/**
|
2009-09-10 18:07:56 -07:00
|
|
|
* Unselect the given column, leaving other selected columns selected (if any).
|
2007-05-11 05:21:43 -07:00
|
|
|
*
|
2009-09-10 18:07:56 -07:00
|
|
|
* @param columnIndex [in] the column index to select
|
2007-05-11 05:21:43 -07:00
|
|
|
*/
|
2009-09-10 18:07:56 -07:00
|
|
|
void unselectColumn(in long columnIndex);
|
2007-05-11 05:21:43 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Use heuristics to determine if table is most likely used for layout.
|
|
|
|
*/
|
2007-03-22 10:30:00 -07:00
|
|
|
boolean isProbablyForLayout();
|
|
|
|
};
|
2007-05-11 05:21:43 -07:00
|
|
|
|
2009-09-10 18:07:56 -07:00
|
|
|
|
|
|
|
[scriptable, uuid(654e296d-fae6-452b-987d-746b20b9514b)]
|
|
|
|
interface nsIAccessibleTableCell : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Return host table accessible.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIAccessibleTable table;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return column index of this cell.
|
|
|
|
*/
|
|
|
|
readonly attribute long columnIndex;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return row index of this cell.
|
|
|
|
*/
|
|
|
|
readonly attribute long rowIndex;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the number of columns occupied by this cell. The result differs
|
|
|
|
* from 1 if the specified cell spans multiple columns.
|
|
|
|
*/
|
|
|
|
readonly attribute long columnExtent;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the number of rows occupied by this accessible cell. The result
|
|
|
|
* differs from 1 if the specified cell spans multiple rows.
|
|
|
|
*/
|
|
|
|
readonly attribute long rowExtent;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return an array of column header cells for this cell.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIArray columnHeaderCells;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return an array of row header cells for this cell.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIArray rowHeaderCells;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return a boolean value indicating whether this cell is selected.
|
|
|
|
*/
|
|
|
|
boolean isSelected();
|
|
|
|
};
|