summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_interface_atspi_accessible.eo
blob: b60a8db28515d6414f603617972069c535571465 (plain) (blame)
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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
/* FIXME: This definitely shouldn't be here. */
type Eo_Event_Cb: __undefined_type;

enum Elm.Atspi.Type
{
   [[Type of accessibility object]]
   regular, [[default accessibile object]]
   disabled, [[skip object and its children in accessibility hierarchy]]
   skipped [[skip object in accessibility hierarchy]]
}

enum Elm.Atspi.Role
{
   [[Describes the role of an object visible to AT-SPI Clients.]]
   invalid,
   accelerator_label,
   alert,
   animation,
   arrow,
   calendar,
   canvas,
   check_box,
   check_menu_item,
   color_chooser,
   column_header,
   combo_box,
   date_editor,
   desktop_icon,
   desktop_frame,
   dial,
   dialog,
   directory_pane,
   drawing_area,
   file_chooser,
   filler,
   focus_traversable,
   font_chooser,
   frame,
   glass_pane,
   html_container,
   icon,
   image,
   internal_frame,
   label,
   layered_pane,
   list,
   list_item,
   menu,
   menu_bar,
   menu_item,
   option_pane,
   page_tab,
   page_tab_list,
   panel,
   password_text,
   popup_menu,
   progress_bar,
   push_button,
   radio_button,
   radio_menu_item,
   root_pane,
   row_header,
   scroll_bar,
   scroll_pane,
   separator,
   slider,
   spin_button,
   split_pane,
   status_bar,
   table,
   table_cell,
   table_column_header,
   table_row_header,
   tearoff_menu_item,
   terminal,
   text,
   toggle_button,
   tool_bar,
   tool_tip,
   tree,
   tree_table,
   unknown,
   viewport,
   window,
   extended,
   header,
   footer,
   paragraph,
   ruler,
   application,
   autocomplete,
   editbar,
   embedded,
   entry,
   chart,
   caption,
   document_frame,
   heading,
   page,
   section,
   redundant_object,
   form,
   link,
   input_method_window,
   table_row,
   tree_item,
   document_spreadsheet,
   document_presentation,
   document_text,
   document_web,
   document_email,
   comment,
   list_box,
   grouping,
   image_map,
   notification,
   info_bar,
   last_defined,
}

enum Elm.Atspi.State_Type
{
   [[Describes a possible states of an object visible to AT-SPI clients.]]
   legacy: elm_atspi_state;
   invalid,
   active,
   armed,
   busy,
   checked,
   collapsed,
   defunct,
   editable,
   enabled,
   expandable,
   expanded,
   focusable,
   focused,
   has_tooltip,
   horizontal,
   iconified,
   modal,
   multi_line,
   multiselectable,
   opaque,
   pressed,
   resizable,
   selectable,
   selected,
   sensitive,
   showing,
   single_line,
   stale,
   transient,
   vertical,
   visible,
   manages_descendants,
   indeterminate,
   required,
   truncated,
   animated,
   invalid_entry,
   supports_autocompletion,
   selectable_text,
   is_default,
   visited,
   last_defined,
}

enum Elm.Atspi.Relation_Type
{
   [[Describes relation between two objects.]]
   legacy: elm_atspi_relation;
   null,
   label_for,
   labelled_by,
   controller_for,
   controlled_by,
   member_of,
   tooltip_for,
   node_child_of,
   node_parent_of,
   extended,
   flows_to,
   flows_from,
   subwindow_of,
   embeds,
   embedded_by,
   popup_for,
   parent_window_of,
   description_for,
   described_by,
   last_defined,
}

type Elm.Atspi.State_Set: uint64; [[ATSPI object state set.]]

struct Elm.Atspi.Event.Handler; [[ATSPI event listener]]

struct Elm.Atspi.Event.State_Changed.Data
{
   type: Elm.Atspi.State_Type;
   new_value: bool;
}

struct Elm.Atspi.Event.Children_Changed.Data
{
   is_added: bool;
   child: Eo.Base *;
}

struct Elm.Atspi.Attribute
{
   key: const(char) *;
   value: const(char) *;
}

struct Elm.Atspi.Relation
{
   type: Elm.Atspi.Relation_Type;
   objects: list<Eo.Base *> *;
}

type Elm.Atspi.Relation_Set: list<Elm.Atspi.Relation *> *;

mixin Elm.Interface.Atspi_Accessible ()
{
   eo_prefix: elm_interface_atspi_accessible;
   data: Elm_Interface_Atspi_Accessible_Data;
   methods {
      @property localized_role_name @protected {
         get {
            [[Gets an localized string describing ATSPI widget role name.]]
         }
         values {
            localized_name: const(char)*;
         }
      }
      @property name {
         get {
            [[Gets an string describing ATSPI widget role name.  Should be free by a user.]]
         }
         set {
         }
         values {
            name: char*; [[obj name]]
         }
      }
      @property relation_set @protected {
         get {
            [[Gets an string describing ATSPI widget role name. Lists and elements Should be free by a user.]]
         }
         values {
            relations: Elm.Atspi.Relation_Set;
         }
      }
      @property role {
         get {
            [[Gets the role of the widget in ATSPI Accessibility domain.]]
         }
         set {
         }
         values {
            role: Elm.Atspi.Role;
         }
      }
      @property children @protected {
         get {
            [[Gets widget's accessible children.]]
         }
         values {
            children: free(own(list<Elm.Interface.Atspi_Accessible *> *), eina_list_free);
         }
      }
      @property role_name @protected {
         get {
            [[Gets human-readable string indentifying widget accessibility role.]]
         }
         values {
            role_name: const(char)*;
         }
      }
      @property attributes @protected {
         get {
            [[Gets key-value pairs indentifying widget extra attributes. Must be free by a user.]]
         }
         values {
            attributes: free(own(list<own(Elm.Atspi.Attribute *)> *), elm_atspi_attributes_list_free);
         }
      }
      @property index_in_parent @protected {
         get {
            [[Gets index of the child in parent's children list.]]
         }
         values {
            idx: int;
         }
      }
      @property description {
         get {
            [[Gets widget contextual information.]]
         }
         set {
            [[Sets contextual information about widget.]]
         }
         values {
            description: const(char)*;
         }
      }
      @property parent {
         get {
            [[Gets widget accessible parent.]]
         }
         set {
            [[Sets widget accessible parent.]]
         }
         values {
            parent: Elm.Interface.Atspi_Accessible *;
         }
      }
      @property state_set @protected {
         get {
            [[Gets set describing widget accessible states.]]
         }
         values {
            states: Elm.Atspi.State_Set;
         }
      }
      event_handler_add @class @protected {
         [[Register accessibility event listener]]
         params {
              @in cb: Eo_Event_Cb; [[callback]]
              @in data: void*; [[data]]
         }
         return: Elm.Atspi.Event.Handler*; [[Event handler]]
      }
      event_handler_del @class @protected {
         [[Deregister accessibility event listener]]
         params {
              @in handler: Elm.Atspi.Event.Handler *; [[Event handler]]
         }
      }
      event_emit @class @protected {
         params {
            @in accessible: Elm.Interface.Atspi_Accessible *; [[Accessibility object.]]
            @in event: const(Eo.Event.Description)*; [[Accessibility event type.]]
            @in event_info: void*; [[Accessibility event details.]]
         }
      }
      @property translation_domain {
         get {
            [[Gets the translation domain of "name" and "description"
              properties.]]
         }
         set {
            [[Sets the translation domain of "name" and "description"
              properties.

              Translation domain should be set if application wants to support i18n
              for accessibily "name" and "description" properties.

              When translation domain is set values of "name" and "description"
              properties will be translated with dgettext function using
              current translation domain as "domainname" parameter.

              It is application developer responsibility to ensure that
              translation files are loaded and binded to translation domain
              when accessibility is enabled.]]
         }
         values {
            domain: const(char)*; [[ translation domain ]]
         }
      }
      @property type {
           get {
                [[Get type of accessibility object]]
           }
           set {
                [[Set type of accessibility object]]
           }
           values {
               type: Elm.Atspi.Type;
           }
      }
      relationship_append {
         [[Defines the relationship between two accessible objects.

           Adds unique relation between source object and relation_object of a
           given type.

           Relationships can be queried by Assistive Technology clients to
           provide customized feedback, improving overall user experience.

           Relationship_append API is asymmetric, which means that
           appending, for example, relation ELM_ATSPI_RELATION_FLOWS_TO from object A to B,
           do NOT append relation ELM_ATSPI_RELATION_FLOWS_FROM from object B to
           object A.

           return: EINA_TRUE is relationship was successfully appended, EINA_FALSE
           otherwise]]
         return: bool;
         params {
            @in type: Elm.Atspi.Relation_Type;
            @in relation_object: const(Elm.Interface.Atspi_Accessible)*;
         }
      }
      relationship_remove {
         [[Removes the relationship between two accessible objects.

          If relation_object is NULL function removes all relations
          of given type.
         ]]
         params {
            @in type: Elm.Atspi.Relation_Type;
            @in relation_object: const(Elm.Interface.Atspi_Accessible)*;
         }
      }
      relationships_clear {
         [[Removes all relationships in accessible object.]]
      }
      @property root @class {
         get {
            [[Get root object of accessible object hierarchy]]
            values {
               ret: Eo.Base*;
            }
         }
      }
   }
   events {
      property,changed: const(char)*;
      children,changed: Elm.Atspi.Event.Children_Changed.Data;
      state,changed: Elm.Atspi.Event.State_Changed.Data;
      visible,data,changed;
      active,descendant,changed;
      added;
      removed;
   }
}