summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_interface_atspi_text.eo
blob: 152c383d1154672c73e8851924a09325ba9a4f39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
import eina_types;

enum Elm.Atspi_Text.Granularity
{
   char,
   word,
   sentence,
   line,
   paragraph
}

enum Elm.Atspi_Text.Clip_Type
{
   legacy: elm_atspi_text_clip;
   none,
   min,
   max,
   both
}

struct Elm.Atspi_Text.Attribute
{
   name:  const(char)*;
   value: const(char)*;
}

struct Elm.Atspi_Text.Range
{
   start_offset: int;
   end_offset : int;
   content: char *;
}

struct Elm.Atspi_Text.Change_Info
{
   content: const(char)*;
   inserted: bool;
   pos: size;
   len: size;
}

interface Elm.Interface.Atspi.Text ()
{
   legacy_prefix: null;
   eo_prefix: elm_interface_atspi_text;
   methods {
      @property character @protected {
         get {
            [[Gets single character present in accessible widget's text at given offset.]]
         }
         keys {
            offset: int; [[Position in text.]]
         }
         values {
            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.]]
         }
      }
      @property string @protected {
         get {
            [[Gets string, start and end offset in text according to given initial offset and granulatity.]]
         }
         keys {
            granularity: Elm.Atspi_Text.Granularity;
            start_offset: int * @nonull; [[Offset indicating start of string according to given granularity.  -1 in case of error.]]
            end_offset: int *; [[Offset indicating end of string according to given granularity. -1 in case of error.]]
         }
         values {
            string: own(char *); [[Newly allocated UTF-8 encoded string.  Must be free by a user.]]
         }
      }
      @property text @protected {
         get {
            [[Gets text of accessible widget.]]
         }
         keys {
            start_offset: int; [[Position in text.]]
            end_offset: int; [[End offset of text.]]
         }
         values {
            text: own(char *); [[UTF-8 encoded text.]]
         }
      }
      @property caret_offset @protected {
         get {
            [[Gets offset position of caret (cursor)]]
         }
         set {
            return: bool; [[$true if caret was successfully moved, $falseotherwise.]]
         }
         values {
            offset: int;
         }
      }
      @property attribute @protected {
         get {
            [[Indicate if a text attribute with a given name is set]]
            return: bool;
         }
         keys {
            name: const(char)* @nonull; [[text attribute name]]
            start_offset: int * @nonull; [[Position in text from which given attribute is set.]]
            end_offset: int *; [[Position in text to which given attribute is set.]]
         }
         values {
            value: own(char *); [[Value of text attribute. Should be free()]]
         }
      }
      @property attributes @protected {
         get {
            [[Gets list of all text attributes.]]
         }
         keys {
            start_offset: int * @nonull;
            end_offset: int *;
         }
         values {
            attributes: own(list<own(Elm.Atspi_Text.Attribute *)> *);
         }
      }
      @property default_attributes @protected {
         get {
         }
         values {
            attributes: own(list<own(Elm.Atspi_Text.Attribute *)>*);
         }
      }
      @property character_extents @protected {
         get {
            return: bool;
         }
         keys {
            offset: int;
            screen_coords: bool;
         }
         values {
            rect: Eina.Rectangle;
         }
      }
      @property character_count @protected {
         get {
         }
         values {
            count: int;
         }
      }
      @property offset_at_point @protected {
         get {
         }
         keys {
            screen_coords: bool;
            x: int;
            y: int;
         }
         values {
            offset: int;
         }
      }
      @property bounded_ranges @protected {
         get {
         }
         keys {
            screen_coords: bool;
            rect: Eina.Rectangle;
            xclip: Elm.Atspi_Text.Clip_Type;
            yclip: Elm.Atspi_Text.Clip_Type;
         }
         values {
            ranges: own(list<own(Elm.Atspi_Text.Range *)> *);
         }
      }
      @property range_extents @protected {
         get {
            return: bool;
         }
         keys {
            screen_coords: bool; [[If true x and y values will be relative to screen origin, otherwise relative to canvas]]
            start_offset: int;
            end_offset: int;
         }
         values {
            rect: Eina.Rectangle;
         }
      }
      @property selections_count @protected {
         get {
         }
         values {
            count: int;
         }
      }
      @property selection @protected {
         get {
         }
         set {
            return: bool;
         }
         keys {
            selection_number: int;
         }
         values {
            start_offset: int;
            end_offset: int;
         }
      }
      selection_add @protected {
         params {
            @in start_offset: int;
            @in end_offset: int;
         }
         return: bool;
      }
      selection_remove @protected {
         params {
            @in selection_number: int;
         }
         return: bool;
      }
   }
   events {
      access,text,bounds,changed;
      access,text,attributes,changed;
      access,text,caret,moved;
      access,text,inserted;
      access,text,removed;
      access,text,selection,changed;
   }
}