summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_access_text.eo
diff options
context:
space:
mode:
authorLukasz Stanislawski <l.stanislaws@samsung.com>2017-09-25 17:15:44 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-26 17:58:07 +0900
commitb3ffd78237282883c327082c841205f2f0643642 (patch)
tree6e5e776dbe7ff8990faa54c0f4bfd5ba60a6962c /src/lib/elementary/efl_access_text.eo
parentc9f51e450b33e3ba6d5c66434f9fb38081b0efb7 (diff)
elm: rename Elm.Interface.Atspi.Text => Efl.Access.Text
Reviewers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D5167
Diffstat (limited to 'src/lib/elementary/efl_access_text.eo')
-rw-r--r--src/lib/elementary/efl_access_text.eo242
1 files changed, 242 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_access_text.eo b/src/lib/elementary/efl_access_text.eo
new file mode 100644
index 0000000..871cb68
--- /dev/null
+++ b/src/lib/elementary/efl_access_text.eo
@@ -0,0 +1,242 @@
1import eina_types;
2
3enum Efl.Access.Text.Granularity
4{
5 [[Text accessibility granularity]]
6 char, [[Character granularity]]
7 word, [[Word granularity]]
8 sentence, [[Sentence granularity]]
9 line, [[Line granularity]]
10 paragraph [[Paragraph granularity]]
11}
12
13enum Efl.Access.Text.Clip_Type
14{
15 [[Text clip type]]
16 legacy: elm_atspi_text_clip;
17 none, [[No clip type]]
18 min, [[Minimum clip type]]
19 max, [[Maximum clip type]]
20 both [[Both clip types]]
21}
22
23struct Efl.Access.Text.Attribute
24{
25 [[Text attribute]]
26 name: string; [[Text attribute name]]
27 value: string; [[Text attribute value]]
28}
29
30struct Efl.Access.Text.Range
31{
32 [[Text range]]
33 start_offset: int; [[Range start offset]]
34 end_offset : int; [[Range end offset]]
35 content: ptr(char); [[Range content]]
36}
37
38struct Efl.Access.Text.Change_Info
39{
40 [[Text change information]]
41 content: string; [[Change content]]
42 inserted: bool; [[$true if text got inserted]]
43 pos: size; [[Change position]]
44 len: size; [[Change length]]
45}
46
47interface Efl.Access.Text ()
48{
49 [[Elementary accessible text interface]]
50 methods {
51 @property character @protected {
52 get {
53 [[Gets single character present in accessible widget's text at given offset.]]
54 }
55 keys {
56 offset: int; [[Position in text.]]
57 }
58 values {
59 character: Eina.Unicode; [[Character at offset. 0 when out-of bounds offset has been given. Codepoints between DC80 and DCFF indicates that string includes invalid UTF8 chars.]]
60 }
61 }
62 @property string @protected {
63 get {
64 [[Gets string, start and end offset in text according to given initial offset and granularity.]]
65 }
66 keys {
67 granularity: Efl.Access.Text.Granularity; [[Text granularity]]
68 start_offset: ptr(int) @nonull; [[Offset indicating start of string according to given granularity. -1 in case of error.]]
69 end_offset: ptr(int); [[Offset indicating end of string according to given granularity. -1 in case of error.]]
70 }
71 values {
72 string: mstring @owned; [[Newly allocated UTF-8 encoded string. Must be free by a user.]]
73 }
74 }
75 @property text @protected {
76 get {
77 [[Gets text of accessible widget.]]
78 }
79 keys {
80 start_offset: int; [[Position in text.]]
81 end_offset: int; [[End offset of text.]]
82 }
83 values {
84 text: mstring @owned; [[UTF-8 encoded text.]]
85 }
86 }
87 @property caret_offset @protected {
88 [[Caret offset property]]
89 get {
90 [[Gets offset position of caret (cursor)]]
91 }
92 set {
93 return: bool; [[$true if caret was successfully moved, $false otherwise.]]
94 }
95 values {
96 offset: int; [[Offset]]
97 }
98 }
99 @property attribute @protected {
100 get {
101 [[Indicate if a text attribute with a given name is set]]
102 return: bool; [[$true if attribute name is set, $false otherwise]]
103 }
104 keys {
105 name: string @nonull; [[Text attribute name]]
106 start_offset: ptr(int) @nonull; [[Position in text from which given attribute is set.]]
107 end_offset: ptr(int); [[Position in text to which given attribute is set.]]
108 }
109 values {
110 value: mstring @owned; [[Value of text attribute. Should be free()]]
111 }
112 }
113 @property attributes @protected {
114 get {
115 [[Gets list of all text attributes.]]
116 }
117 keys {
118 start_offset: ptr(int) @nonull; [[Start offset]]
119 end_offset: ptr(int); [[End offset]]
120 }
121 values {
122 attributes: list<ptr(Efl.Access.Text.Attribute) @owned> @owned; [[List of text attributes]]
123 }
124 }
125 @property default_attributes @protected {
126 [[Default attributes]]
127 get {
128 }
129 values {
130 attributes: list<ptr(Efl.Access.Text.Attribute) @owned> @owned; [[List of default attributes]]
131 }
132 }
133 @property character_extents @protected {
134 [[Character extents]]
135 get {
136 return: bool; [[$true if character extents, $false otherwise]]
137 }
138 keys {
139 offset: int; [[Offset]]
140 screen_coords: bool; [[If $true, x and y values will be relative to screen origin, otherwise relative to canvas]]
141 }
142 values {
143 rect: Eina.Rect; [[Extents rectangle]]
144 }
145 }
146 @property character_count @protected {
147 [[Character count]]
148 get {
149 }
150 values {
151 count: int; [[Character count]]
152 }
153 }
154 @property offset_at_point @protected {
155 [[Offset at given point]]
156 get {
157 }
158 keys {
159 screen_coords: bool; [[If $true, x and y values will be relative to screen origin, otherwise relative to canvas]]
160 x: int; [[X coordinate]]
161 y: int; [[Y coordinate]]
162 }
163 values {
164 offset: int; [[Offset]]
165 }
166 }
167 @property bounded_ranges @protected {
168 [[Bounded ranges]]
169 get {
170 }
171 keys {
172 screen_coords: bool; [[If $true, x and y values will be relative to screen origin, otherwise relative to canvas]]
173 rect: Eina.Rect; [[Bounding box]]
174 xclip: Efl.Access.Text.Clip_Type; [[xclip]]
175 yclip: Efl.Access.Text.Clip_Type; [[yclip]]
176 }
177 values {
178 ranges: list<ptr(Efl.Access.Text.Range) @owned> @owned; [[List of ranges]]
179 }
180 }
181 @property range_extents @protected {
182 [[Range extents]]
183 get {
184 return: bool; [[$true if range extents, $false otherwise]]
185 }
186 keys {
187 screen_coords: bool; [[If $true, x and y values will be relative to screen origin, otherwise relative to canvas]]
188 start_offset: int; [[Start offset]]
189 end_offset: int; [[End offset]]
190 }
191 values {
192 rect: Eina.Rect; [[Range rectangle]]
193 }
194 }
195 @property selections_count @protected {
196 [[Selection count property]]
197 get {
198 }
199 values {
200 count: int; [[Selection counter]]
201 }
202 }
203 @property selection @protected {
204 [[Selection property]]
205 get {
206 }
207 set {
208 return: bool; [[$true if selection was set, $false otherwise]]
209 }
210 keys {
211 selection_number: int; [[Selection number for identification]]
212 }
213 values {
214 start_offset: int; [[Selection start offset]]
215 end_offset: int; [[Selection end offset]]
216 }
217 }
218 selection_add @protected {
219 [[Add selection]]
220 params {
221 @in start_offset: int; [[Start selection from this offset]]
222 @in end_offset: int; [[End selection at this offset]]
223 }
224 return: bool; [[$true if selection was added, $false otherwise]]
225 }
226 selection_remove @protected {
227 [[Remove selection]]
228 params {
229 @in selection_number: int; [[Selection number to be removed]]
230 }
231 return: bool; [[$true if selection was removed, $false otherwise]]
232 }
233 }
234 events {
235 access,text,bounds,changed; [[Text bounds have changed]]
236 access,text,attributes,changed; [[Text attributes have changed]]
237 access,text,caret,moved; [[Caret moved]]
238 access,text,inserted; [[Text was inserted]]
239 access,text,removed; [[Text was removed]]
240 access,text,selection,changed; [[Text selection has changed]]
241 }
242}