accessible/public/nsIAccessibleTable.idl

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
michael@0 2 *
michael@0 3 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7 #include "nsISupports.idl"
michael@0 8
michael@0 9 interface nsIAccessible;
michael@0 10 interface nsIArray;
michael@0 11
michael@0 12 [scriptable, uuid(cb0bf7b9-117e-40e2-9e46-189c3d43ce4a)]
michael@0 13 interface nsIAccessibleTable : nsISupports
michael@0 14 {
michael@0 15 /**
michael@0 16 * Return the caption accessible for the table. For example, html:caption
michael@0 17 * element of html:table element.
michael@0 18 */
michael@0 19 readonly attribute nsIAccessible caption;
michael@0 20
michael@0 21 /**
michael@0 22 * Return summary description for the table. For example, @summary attribute
michael@0 23 * on html:table element.
michael@0 24 */
michael@0 25 readonly attribute AString summary;
michael@0 26
michael@0 27 /**
michael@0 28 * Return columns count in the table.
michael@0 29 */
michael@0 30 readonly attribute long columnCount;
michael@0 31
michael@0 32 /**
michael@0 33 * Return rows count in the table.
michael@0 34 */
michael@0 35 readonly attribute long rowCount;
michael@0 36
michael@0 37 /**
michael@0 38 * Return the accessible object at the specified row and column in the table.
michael@0 39 * If both row and column index are valid then the corresponding accessible
michael@0 40 * object is returned that represents the requested cell regardless of whether
michael@0 41 * the cell is currently visible (on the screen).
michael@0 42 *
michael@0 43 * @param rowIndex [in] the row index to retrieve the cell at
michael@0 44 * @param columnIndex [in] the column index to retrieve the cell at
michael@0 45 */
michael@0 46 nsIAccessible getCellAt(in long rowIndex, in long columnIndex);
michael@0 47
michael@0 48 /**
michael@0 49 * Translate the given row and column indices into the corresponding cell
michael@0 50 * index.
michael@0 51 *
michael@0 52 * @param rowIndex [in] the row index to return cell index at
michael@0 53 * @param columnIndex [in] the column index to return cell index at
michael@0 54 */
michael@0 55 long getCellIndexAt(in long rowIndex, in long columnIndex);
michael@0 56
michael@0 57 /**
michael@0 58 * Translate the given cell index into the corresponding column index.
michael@0 59 *
michael@0 60 * @param cellIndex [in] index of the table cell to return column index for
michael@0 61 */
michael@0 62 long getColumnIndexAt(in long cellIndex);
michael@0 63
michael@0 64 /**
michael@0 65 * Translate the given cell index into the corresponding row index.
michael@0 66 *
michael@0 67 * @param cellIndex [in] index of the table cell to return row index for
michael@0 68 */
michael@0 69 long getRowIndexAt(in long cellIndex);
michael@0 70
michael@0 71 /**
michael@0 72 * Translate the given cell index into the corresponding row and column
michael@0 73 * indices.
michael@0 74 *
michael@0 75 * @param cellIndex [in] cell index to return row and column indices for
michael@0 76 * @param rowIndex [out] row index at the given cell index
michael@0 77 * @param columnIndex [out] column index at the given cell index
michael@0 78 */
michael@0 79 void getRowAndColumnIndicesAt(in long cellIndex,
michael@0 80 out long rowIndex, out long columnIndex);
michael@0 81
michael@0 82 /**
michael@0 83 * Return the number of columns occupied by the accessible cell at
michael@0 84 * the specified row and column in the table. The result differs from 1 if
michael@0 85 * the specified cell spans multiple columns.
michael@0 86 *
michael@0 87 * @param row [in] row index of the cell to return the column extent for
michael@0 88 * @param column [in] column index of the cell to return the column extent
michael@0 89 * for
michael@0 90 */
michael@0 91 long getColumnExtentAt(in long row, in long column);
michael@0 92
michael@0 93 /**
michael@0 94 * Return the number of rows occupied by the accessible cell at the specified
michael@0 95 * row and column in the table. The result differs from 1 if the specified
michael@0 96 * cell spans multiple rows.
michael@0 97 *
michael@0 98 * @param row [in] row index of the cell to return the column extent for
michael@0 99 * @param column [in] column index of the cell to return the column extent
michael@0 100 * for
michael@0 101 */
michael@0 102 long getRowExtentAt(in long row, in long column);
michael@0 103
michael@0 104 /**
michael@0 105 * Return the description text of the specified column in the table.
michael@0 106 *
michael@0 107 * @param columnIndex [in] the column index to retrieve description for
michael@0 108 */
michael@0 109 AString getColumnDescription(in long columnIndex);
michael@0 110
michael@0 111 /**
michael@0 112 * Return the description text of the specified row in the table.
michael@0 113 *
michael@0 114 * @param rowIndex [in] the row index to retrieve description for
michael@0 115 */
michael@0 116 AString getRowDescription(in long rowIndex);
michael@0 117
michael@0 118 /**
michael@0 119 * Return a boolean value indicating whether the specified column is
michael@0 120 * selected, i.e. all cells within the column are selected.
michael@0 121 *
michael@0 122 * @param columnIndex [in] the column index to determine if it's selected
michael@0 123 */
michael@0 124 boolean isColumnSelected(in long columnIndex);
michael@0 125
michael@0 126 /**
michael@0 127 * Return a boolean value indicating whether the specified row is selected,
michael@0 128 * i.e. all cells within the row are selected.
michael@0 129 *
michael@0 130 * @param rowIndex [in] the row index to determine whether it's selected
michael@0 131 */
michael@0 132 boolean isRowSelected(in long rowIndex);
michael@0 133
michael@0 134 /**
michael@0 135 * Return a boolean value indicating whether the specified cell is selected.
michael@0 136 *
michael@0 137 * @param rowIndex [in] the row index of the cell
michael@0 138 * @param columnIndex [in] the column index of the cell
michael@0 139 */
michael@0 140 boolean isCellSelected(in long rowIndex, in long columnIndex);
michael@0 141
michael@0 142 /**
michael@0 143 * Return the total number of selected cells.
michael@0 144 */
michael@0 145 readonly attribute unsigned long selectedCellCount;
michael@0 146
michael@0 147 /**
michael@0 148 * Return the total number of selected columns.
michael@0 149 */
michael@0 150 readonly attribute unsigned long selectedColumnCount;
michael@0 151
michael@0 152 /**
michael@0 153 * Return the total number of selected rows.
michael@0 154 */
michael@0 155 readonly attribute unsigned long selectedRowCount;
michael@0 156
michael@0 157 /**
michael@0 158 * Return an array of selected cells.
michael@0 159 */
michael@0 160 readonly attribute nsIArray selectedCells;
michael@0 161
michael@0 162 /**
michael@0 163 * Return an array of cell indices currently selected.
michael@0 164 *
michael@0 165 * @param cellsArraySize [in] length of array
michael@0 166 * @param cellsArray [in] array of indexes of selected cells
michael@0 167 */
michael@0 168 void getSelectedCellIndices(out unsigned long cellsArraySize,
michael@0 169 [retval, array, size_is(cellsArraySize)] out long cellsArray);
michael@0 170
michael@0 171 /**
michael@0 172 * Return an array of column indices currently selected.
michael@0 173 *
michael@0 174 * @param columnsArraySize [in] length of array
michael@0 175 * @param columnsArray [in] array of indices of selected columns
michael@0 176 */
michael@0 177 void getSelectedColumnIndices(out unsigned long columnsArraySize,
michael@0 178 [retval, array, size_is(columnsArraySize)] out long columnsArray);
michael@0 179
michael@0 180 /**
michael@0 181 * Return an array of row indices currently selected.
michael@0 182 *
michael@0 183 * @param rowsArraySize [in] Length of array
michael@0 184 * @param rowsArray [in] array of indices of selected rows
michael@0 185 */
michael@0 186 void getSelectedRowIndices(out unsigned long rowsArraySize,
michael@0 187 [retval, array, size_is(rowsArraySize)] out long rowsArray);
michael@0 188
michael@0 189 /**
michael@0 190 * Select a row and unselects all previously selected rows.
michael@0 191 *
michael@0 192 * @param rowIndex [in] the row index to select
michael@0 193 */
michael@0 194 void selectRow(in long rowIndex);
michael@0 195
michael@0 196 /**
michael@0 197 * Select a column and unselects all previously selected columns.
michael@0 198 *
michael@0 199 * @param columnIndex [in] the column index to select
michael@0 200 */
michael@0 201 void selectColumn(in long columnIndex);
michael@0 202
michael@0 203 /**
michael@0 204 * Unselect the given row, leaving other selected rows selected (if any).
michael@0 205 *
michael@0 206 * @param rowIndex [in] the row index to select
michael@0 207 */
michael@0 208 void unselectRow(in long rowIndex);
michael@0 209
michael@0 210 /**
michael@0 211 * Unselect the given column, leaving other selected columns selected (if any).
michael@0 212 *
michael@0 213 * @param columnIndex [in] the column index to select
michael@0 214 */
michael@0 215 void unselectColumn(in long columnIndex);
michael@0 216
michael@0 217 /**
michael@0 218 * Use heuristics to determine if table is most likely used for layout.
michael@0 219 */
michael@0 220 boolean isProbablyForLayout();
michael@0 221 };
michael@0 222
michael@0 223
michael@0 224 [scriptable, uuid(654e296d-fae6-452b-987d-746b20b9514b)]
michael@0 225 interface nsIAccessibleTableCell : nsISupports
michael@0 226 {
michael@0 227 /**
michael@0 228 * Return host table accessible.
michael@0 229 */
michael@0 230 readonly attribute nsIAccessibleTable table;
michael@0 231
michael@0 232 /**
michael@0 233 * Return column index of this cell.
michael@0 234 */
michael@0 235 readonly attribute long columnIndex;
michael@0 236
michael@0 237 /**
michael@0 238 * Return row index of this cell.
michael@0 239 */
michael@0 240 readonly attribute long rowIndex;
michael@0 241
michael@0 242 /**
michael@0 243 * Return the number of columns occupied by this cell. The result differs
michael@0 244 * from 1 if the specified cell spans multiple columns.
michael@0 245 */
michael@0 246 readonly attribute long columnExtent;
michael@0 247
michael@0 248 /**
michael@0 249 * Return the number of rows occupied by this accessible cell. The result
michael@0 250 * differs from 1 if the specified cell spans multiple rows.
michael@0 251 */
michael@0 252 readonly attribute long rowExtent;
michael@0 253
michael@0 254 /**
michael@0 255 * Return an array of column header cells for this cell.
michael@0 256 */
michael@0 257 readonly attribute nsIArray columnHeaderCells;
michael@0 258
michael@0 259 /**
michael@0 260 * Return an array of row header cells for this cell.
michael@0 261 */
michael@0 262 readonly attribute nsIArray rowHeaderCells;
michael@0 263
michael@0 264 /**
michael@0 265 * Return a boolean value indicating whether this cell is selected.
michael@0 266 */
michael@0 267 boolean isSelected();
michael@0 268 };

mercurial