[NUI] Add descriptions of Accessibility Interfaces
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Accessibility / IAtspiText.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.ComponentModel;
20 using Tizen.NUI.BaseComponents;
21
22 namespace Tizen.NUI.Accessibility
23 {
24     /// <summary>
25     /// Interface representing objects which can store immutable texts.
26     /// </summary>
27     [EditorBrowsable(EditorBrowsableState.Never)]
28     public interface IAtspiText
29     {
30         /// <summary>
31         /// Gets stored text in given range.
32         /// </summary>
33         /// <param name="startOffset"> The index of first character </param>
34         /// <param name="endOffset"> The index of first character after the last one expected </param>
35         /// <returns> The substring of stored text </returns>
36         [EditorBrowsable(EditorBrowsableState.Never)]
37         string AccessibilityGetText(int startOffset, int endOffset);
38
39         /// <summary>
40         /// Gets number of all stored characters.
41         /// </summary>
42         /// <returns> The number of characters </returns>
43         [EditorBrowsable(EditorBrowsableState.Never)]
44         int AccessibilityGetCharacterCount();
45
46         /// <summary>
47         /// Gets the cursor offset.
48         /// </summary>
49         /// <returns> Value of cursor offset </returns>
50         [EditorBrowsable(EditorBrowsableState.Never)]
51         int AccessibilityGetCursorOffset();
52
53         /// <summary>
54         /// Sets the cursor offset.
55         /// </summary>
56         /// <param name="offset"> Cursor offset </param>
57         /// <returns> True if successful </returns>
58         [EditorBrowsable(EditorBrowsableState.Never)]
59         bool AccessibilitySetCursorOffset(int offset);
60
61         /// <summary>
62         /// Gets substring of stored text truncated in concrete gradation.
63         /// </summary>
64         /// <param name="offset"> The position in stored text </param>
65         /// <param name="boundary"> The enumeration describing text gradation </param>
66         /// <returns> Range structure containing acquired text and offsets in original string </returns>
67         [EditorBrowsable(EditorBrowsableState.Never)]
68         AccessibilityRange AccessibilityGetTextAtOffset(int offset, AccessibilityTextBoundary boundary);
69
70         /// <summary>
71         /// Gets selected text.
72         /// </summary>
73         /// <remarks>
74         ///  Currently only one selection (i.e. with index = 0) is supported
75         /// </remarks>
76         /// <param name="selectionNumber"> The selection index </param>
77         /// <returns> Range structure containing acquired text and offsets in original string </returns>
78         [EditorBrowsable(EditorBrowsableState.Never)]
79         AccessibilityRange AccessibilityGetSelection(int selectionNumber);
80
81         /// <summary>
82         /// Removes the whole selection.
83         /// </summary>
84         /// <remarks>
85         ///  Currently only one selection (i.e. with index = 0) is supported
86         /// </remarks>
87         /// <param name="selectionNumber"> The selection index </param>
88         /// <returns> True on success, false otherwise </returns>
89         [EditorBrowsable(EditorBrowsableState.Never)]
90         bool AccessibilityRemoveSelection(int selectionNumber);
91
92         /// <summary>
93         /// Sets selected text.
94         /// </summary>
95         /// <remarks>
96         ///  Currently only one selection (i.e. with index = 0) is supported
97         /// </remarks>
98         /// <param name="selectionNumber"> The selection index </param>
99         /// <param name="startOffset"> The index of first character </param>
100         /// <param name="endOffset"> The index of first character after the last one expected </param>
101         /// <returns> True on success, false otherwise </returns>
102         [EditorBrowsable(EditorBrowsableState.Never)]
103         bool AccessibilitySetSelection(int selectionNumber, int startOffset, int endOffset);
104
105         /// <summary>
106         /// Gets the bounding box for text within a range in text.
107         /// </summary>
108         /// <param name="startOffset"> The index of first character </param>
109         /// <param name="endOffset"> The index of first character after the last one expected </param>
110         /// <param name="coordType"> The enumeration with type of coordinate system </param>
111         /// <returns> Rectangle giving the position and size of the specified range of text </returns>
112         [EditorBrowsable(EditorBrowsableState.Never)]
113         Rectangle AccessibilityGetRangeExtents(int startOffset, int endOffset, AccessibilityCoordinateType coordType);
114     }
115 }