2 * Copyright(c) 2023 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 using System.Collections.Generic;
20 using System.ComponentModel;
21 using Tizen.NUI.BaseComponents;
23 namespace Tizen.NUI.Accessibility
26 /// Interface representing a table.
29 /// The selection methods extend the Selection interface, so both should be implemented by table and grid controls.
31 [EditorBrowsable(EditorBrowsableState.Never)]
32 public interface IAtspiTable
35 /// Gets the number of rows.
37 /// <returns> The number of rows </returns>
38 [EditorBrowsable(EditorBrowsableState.Never)]
39 int AccessibilityGetRowCount();
42 /// Gets the number of columns.
44 /// <returns> The number of columns </returns>
45 [EditorBrowsable(EditorBrowsableState.Never)]
46 int AccessibilityGetColumnCount();
49 /// Gets the number of selected rows.
51 /// <returns> The number of selected rows </returns>
52 [EditorBrowsable(EditorBrowsableState.Never)]
53 int AccessibilityGetSelectedRowCount();
56 /// Gets the number of selected columns.
58 /// <returns> The number of selected columns </returns>
59 [EditorBrowsable(EditorBrowsableState.Never)]
60 int AccessibilityGetSelectedColumnCount();
63 /// Gets the table's caption.
65 /// <returns> The caption or null </returns>
66 [EditorBrowsable(EditorBrowsableState.Never)]
67 View AccessibilityGetCaption();
70 /// Gets the table's summary.
72 /// <returns> The summary or null </returns>
73 [EditorBrowsable(EditorBrowsableState.Never)]
74 View AccessibilityGetSummary();
77 /// Gets the cell at the specified position.
79 /// <param name="row"> Row number </param>
80 /// <param name="column"> Column number </param>
81 /// <returns> The cell or null </returns>
82 [EditorBrowsable(EditorBrowsableState.Never)]
83 IAtspiTableCell AccessibilityGetCell(int row, int column);
86 /// Gets the one-dimensional index of a cell.
89 /// The returned index should be such that:
91 /// GetChildAtIndex(GetChildIndex(row, column)) == GetCell(row, column)
94 /// <param name="row"> Row number </param>
95 /// <param name="column"> Column number </param>
96 /// <returns> The one-dimensional index </returns>
97 [EditorBrowsable(EditorBrowsableState.Never)]
98 int AccessibilityGetChildIndex(int row, int column);
101 /// Gets the position (row and column) of a cell.
103 /// <param name="childIndex"> One-dimensional index of the cell </param>
104 /// <returns> A pair of integers (row index, column index) </returns>
105 [EditorBrowsable(EditorBrowsableState.Never)]
106 Tuple<int, int> AccessibilityGetPositionByChildIndex(int childIndex);
109 /// Gets the description of a row.
111 /// <param name="row"> Row number </param>
112 /// <returns> The description of the row </returns>
113 [EditorBrowsable(EditorBrowsableState.Never)]
114 string AccessibilityGetRowDescription(int row);
117 /// Gets the description of a column.
119 /// <param name="column"> Column number </param>
120 /// <returns> The description of the column </returns>
121 [EditorBrowsable(EditorBrowsableState.Never)]
122 string AccessibilityGetColumnDescription(int column);
125 /// Gets the header of a row.
127 /// <param name="row"> Row number </param>
128 /// <returns> The row header or null </returns>
129 [EditorBrowsable(EditorBrowsableState.Never)]
130 View AccessibilityGetRowHeader(int row);
133 /// Gets the header of a column.
135 /// <param name="column"> Column number </param>
136 /// <returns> The column header or null </returns>
137 [EditorBrowsable(EditorBrowsableState.Never)]
138 View AccessibilityGetColumnHeader(int column);
141 /// Gets all selected rows' numbers.
143 /// <returns> Selected rows' numbers </returns>
144 [EditorBrowsable(EditorBrowsableState.Never)]
145 IEnumerable<int> AccessibilityGetSelectedRows();
148 /// Gets all selected columns' numbers.
150 /// <returns> Selected columns' numbers </returns>
151 [EditorBrowsable(EditorBrowsableState.Never)]
152 IEnumerable<int> AccessibilityGetSelectedColumns();
155 /// Checks if a row is selected.
157 /// <param name="row"> Row number </param>
158 /// <returns> True if the row is selected, false otherwise </returns>
159 [EditorBrowsable(EditorBrowsableState.Never)]
160 bool AccessibilityIsRowSelected(int row);
163 /// Checks if a column is selected.
165 /// <param name="column"> Column number </param>
166 /// <returns> True if the column is selected, false otherwise </returns>
167 [EditorBrowsable(EditorBrowsableState.Never)]
168 bool AccessibilityIsColumnSelected(int column);
171 /// Checks if a cell is selected.
173 /// <param name="row"> Row number of the cell </param>
174 /// <param name="column"> Column number of the cell </param>
175 /// <returns> True if the cell is selected, false otherwise </returns>
176 [EditorBrowsable(EditorBrowsableState.Never)]
177 bool AccessibilityIsCellSelected(int row, int column);
182 /// <param name="row"> Row number </param>
183 /// <returns> True on success, false otherwise </returns>
184 [EditorBrowsable(EditorBrowsableState.Never)]
185 bool AccessibilityAddRowSelection(int row);
188 /// Selects a column.
190 /// <param name="column"> Column number </param>
191 /// <returns> True on success, false otherwise </returns>
192 [EditorBrowsable(EditorBrowsableState.Never)]
193 bool AccessibilityAddColumnSelection(int column);
198 /// <param name="row"> Row number </param>
199 /// <returns> True on success, false otherwise </returns>
200 [EditorBrowsable(EditorBrowsableState.Never)]
201 bool AccessibilityRemoveRowSelection(int row);
204 /// Unselects a column.
206 /// <param name="column"> Column number </param>
207 /// <returns> True on success, false otherwise </returns>
208 [EditorBrowsable(EditorBrowsableState.Never)]
209 bool AccessibilityRemoveColumnSelection(int column);