[NUI] Add descriptions of Accessibility Interfaces
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Accessibility / IAtspiTable.cs
1 /*
2  * Copyright(c) 2023 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 using System;
19 using System.Collections.Generic;
20 using System.ComponentModel;
21 using Tizen.NUI.BaseComponents;
22
23 namespace Tizen.NUI.Accessibility
24 {
25     /// <summary>
26     /// Interface representing a table.
27     /// </summary>
28     /// <remarks>
29     /// The selection methods extend the Selection interface, so both should be implemented by table and grid controls.
30     /// </remarks>
31     [EditorBrowsable(EditorBrowsableState.Never)]
32     public interface IAtspiTable
33     {
34         /// <summary>
35         /// Gets the number of rows.
36         /// </summary>
37         /// <returns> The number of rows </returns>
38         [EditorBrowsable(EditorBrowsableState.Never)]
39         int AccessibilityGetRowCount();
40
41         /// <summary>
42         /// Gets the number of columns.
43         /// </summary>
44         /// <returns> The number of columns </returns>
45         [EditorBrowsable(EditorBrowsableState.Never)]
46         int AccessibilityGetColumnCount();
47
48         /// <summary>
49         /// Gets the number of selected rows.
50         /// </summary>
51         /// <returns> The number of selected rows </returns>
52         [EditorBrowsable(EditorBrowsableState.Never)]
53         int AccessibilityGetSelectedRowCount();
54
55         /// <summary>
56         /// Gets the number of selected columns.
57         /// </summary>
58         /// <returns> The number of selected columns </returns>
59         [EditorBrowsable(EditorBrowsableState.Never)]
60         int AccessibilityGetSelectedColumnCount();
61
62         /// <summary>
63         /// Gets the table's caption.
64         /// </summary>
65         /// <returns> The caption or null </returns>
66         [EditorBrowsable(EditorBrowsableState.Never)]
67         View AccessibilityGetCaption();
68
69         /// <summary>
70         /// Gets the table's summary.
71         /// </summary>
72         /// <returns> The summary or null </returns>
73         [EditorBrowsable(EditorBrowsableState.Never)]
74         View AccessibilityGetSummary();
75
76         /// <summary>
77         /// Gets the cell at the specified position.
78         /// </summary>
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);
84
85         /// <summary>
86         /// Gets the one-dimensional index of a cell.
87         /// </summary>
88         /// <remarks>
89         /// The returned index should be such that:
90         ///  <code>
91         ///   GetChildAtIndex(GetChildIndex(row, column)) == GetCell(row, column)
92         ///  </code>
93         /// </remarks>
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);
99
100         /// <summary>
101         /// Gets the position (row and column) of a cell.
102         /// </summary>
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);
107
108         /// <summary>
109         /// Gets the description of a row.
110         /// </summary>
111         /// <param name="row"> Row number </param>
112         /// <returns> The description of the row </returns>
113         [EditorBrowsable(EditorBrowsableState.Never)]
114         string AccessibilityGetRowDescription(int row);
115
116         /// <summary>
117         /// Gets the description of a column.
118         /// </summary>
119         /// <param name="column"> Column number </param>
120         /// <returns> The description of the column </returns>
121         [EditorBrowsable(EditorBrowsableState.Never)]
122         string AccessibilityGetColumnDescription(int column);
123
124         /// <summary>
125         /// Gets the header of a row.
126         /// </summary>
127         /// <param name="row"> Row number </param>
128         /// <returns> The row header or null </returns>
129         [EditorBrowsable(EditorBrowsableState.Never)]
130         View AccessibilityGetRowHeader(int row);
131
132         /// <summary>
133         /// Gets the header of a column.
134         /// </summary>
135         /// <param name="column"> Column number </param>
136         /// <returns> The column header or null </returns>
137         [EditorBrowsable(EditorBrowsableState.Never)]
138         View AccessibilityGetColumnHeader(int column);
139
140         /// <summary>
141         /// Gets all selected rows' numbers.
142         /// </summary>
143         /// <returns> Selected rows' numbers </returns>
144         [EditorBrowsable(EditorBrowsableState.Never)]
145         IEnumerable<int> AccessibilityGetSelectedRows();
146
147         /// <summary>
148         /// Gets all selected columns' numbers.
149         /// </summary>
150         /// <returns> Selected columns' numbers </returns>
151         [EditorBrowsable(EditorBrowsableState.Never)]
152         IEnumerable<int> AccessibilityGetSelectedColumns();
153
154         /// <summary>
155         /// Checks if a row is selected.
156         /// </summary>
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);
161
162         /// <summary>
163         /// Checks if a column is selected.
164         /// </summary>
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);
169
170         /// <summary>
171         /// Checks if a cell is selected.
172         /// </summary>
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);
178
179         /// <summary>
180         /// Selects a row.
181         /// </summary>
182         /// <param name="row"> Row number </param>
183         /// <returns> True on success, false otherwise </returns>
184         [EditorBrowsable(EditorBrowsableState.Never)]
185         bool AccessibilityAddRowSelection(int row);
186
187         /// <summary>
188         /// Selects a column.
189         /// </summary>
190         /// <param name="column"> Column number </param>
191         /// <returns> True on success, false otherwise </returns>
192         [EditorBrowsable(EditorBrowsableState.Never)]
193         bool AccessibilityAddColumnSelection(int column);
194
195         /// <summary>
196         /// Unselects a row.
197         /// </summary>
198         /// <param name="row"> Row number </param>
199         /// <returns> True on success, false otherwise </returns>
200         [EditorBrowsable(EditorBrowsableState.Never)]
201         bool AccessibilityRemoveRowSelection(int row);
202
203         /// <summary>
204         /// Unselects a column.
205         /// </summary>
206         /// <param name="column"> Column number </param>
207         /// <returns> True on success, false otherwise </returns>
208         [EditorBrowsable(EditorBrowsableState.Never)]
209         bool AccessibilityRemoveColumnSelection(int column);
210     }
211 }