1import eina_types;
2
3enum @beta Efl.Access.Type
4{
5   [[Type of accessibility object]]
6   regular, [[default accessible object]]
7   disabled, [[skip object and its children in accessibility hierarchy]]
8   skipped [[skip object in accessibility hierarchy]]
9}
10
11enum @beta Efl.Access.Role
12{
13   [[Describes the role of an object visible to Accessibility Clients.]]
14   invalid, [[Role: invalid]]
15   accelerator_label, [[Role: accelerator label]]
16   alert, [[Role: alert]]
17   animation, [[Role: animation]]
18   arrow, [[Role: arrow]]
19   calendar, [[Role: calendar]]
20   canvas, [[Role: canvas]]
21   check_box, [[Role: check box]]
22   check_menu_item, [[Role: check menu item]]
23   color_chooser, [[Role: color chooser]]
24   column_header, [[Role: column header]]
25   combo_box, [[Role: combo box]]
26   date_editor, [[Role: data editor]]
27   desktop_icon, [[Role: desktop icon]]
28   desktop_frame, [[Role: desktop frame]]
29   dial, [[Role: dial]]
30   dialog, [[Role: dialog]]
31   directory_pane, [[Role: directory pane]]
32   drawing_area, [[Role: drawing area]]
33   file_chooser, [[Role: file chooser]]
34   filler, [[Role: filler]]
35   focus_traversable, [[Role: focus traversable]]
36   font_chooser, [[Role: font chooser]]
37   frame, [[Role: frame]]
38   glass_pane, [[Role: glass pane]]
39   html_container, [[Role: HTML container]]
40   icon, [[Role: icon]]
41   image, [[Role: image]]
42   internal_frame, [[Role: internal frame]]
43   label, [[Role: label]]
44   layered_pane, [[Role: layered pane]]
45   list, [[Role: list]]
46   list_item, [[Role: list item]]
47   menu, [[Role: menu]]
48   menu_bar, [[Role: menu bar]]
49   menu_item, [[Role: menu item]]
50   option_pane, [[Role: option pane]]
51   page_tab, [[Role: page tab]]
52   page_tab_list, [[Role: page tab list]]
53   panel, [[Role: panel]]
54   password_text, [[Role: password text]]
55   popup_menu, [[Role: popup menu]]
56   progress_bar, [[Role: progress bar]]
57   push_button, [[Role: push button]]
58   radio_button, [[Role: radio button]]
59   radio_menu_item, [[Role: radio menu item]]
60   root_pane, [[Role: root pane]]
61   row_header, [[Role: row header]]
62   scroll_bar, [[Role: scroll bar]]
63   scroll_pane, [[Role: scroll pane]]
64   separator, [[Role: separator]]
65   slider, [[Role: slider]]
66   spin_button, [[Role: spin button]]
67   split_pane, [[Role: split pane]]
68   status_bar, [[Role: status bar]]
69   table, [[Role: table]]
70   table_cell, [[Role: table cell]]
71   table_column_header, [[Role: table column header]]
72   table_row_header, [[Role: table row header]]
73   tearoff_menu_item, [[Role: tearoff menu item]]
74   terminal, [[Role: terminal]]
75   text, [[Role: text]]
76   toggle_button, [[Role: toggle button]]
77   tool_bar, [[Role: too bar]]
78   tool_tip, [[Role: tool tip]]
79   tree, [[Role: tree]]
80   tree_table, [[Role: tree table]]
81   unknown, [[Role: unknown]]
82   viewport, [[Role: viewport]]
83   window, [[Role: window]]
84   extended, [[Role: extended]]
85   header, [[Role: header]]
86   footer, [[Role: footer]]
87   paragraph, [[Role: paragraph]]
88   ruler, [[Role: ruler]]
89   application, [[Role: application]]
90   autocomplete, [[Role: autocomplete]]
91   editbar, [[Role: editbar]]
92   embedded, [[Role: embedded]]
93   entry, [[Role: entry]]
94   chart, [[Role: chart]]
95   caption, [[Role: caption]]
96   document_frame, [[Role: document frame]]
97   heading, [[Role: heading]]
98   page, [[Role: page]]
99   section, [[Role: section]]
100   redundant_object, [[Role: redundant object]]
101   form, [[Role: form]]
102   link, [[Role: link]]
103   input_method_window, [[Role: input method window]]
104   table_row, [[Role: table row]]
105   tree_item, [[Role: table item]]
106   document_spreadsheet, [[Role: document spreadsheet]]
107   document_presentation, [[Role: document presentation]]
108   document_text, [[Role: document text]]
109   document_web, [[Role: document web]]
110   document_email, [[Role: document email]]
111   comment, [[Role: comment]]
112   list_box, [[Role: list box]]
113   grouping, [[Role: grouping]]
114   image_map, [[Role: image map]]
115   notification, [[Role: notification]]
116   info_bar, [[Role: info bar]]
117   last_defined,  [[Last enum entry sentinel]]
118}
119
120enum @beta Efl.Access.State_Type
121{
122   [[Describes the possible states for an object visible to accessibility clients.]]
123   invalid, [[State: invalid]]
124   active, [[State: active]]
125   armed, [[State: armed]]
126   busy, [[State: busy]]
127   checked, [[State: checked]]
128   collapsed, [[State: collapsed]]
129   defunct, [[State: defunct]]
130   editable, [[State: editable]]
131   enabled, [[State: enabled]]
132   expandable, [[State: expandable]]
133   expanded, [[State: expanded]]
134   focusable, [[State: focusable]]
135   focused, [[State: focused]]
136   has_tooltip, [[State: has a tooltip]]
137   horizontal, [[State: horizontal]]
138   minimized, [[State: minimized]]
139   modal, [[State: modal]]
140   multi_line, [[State: multi line]]
141   multiselectable, [[State: multiselectable]]
142   opaque, [[State: opaque]]
143   pressed, [[State: pressed]]
144   resizable, [[State: resizable]]
145   selectable, [[State: selectable]]
146   selected, [[State: selected]]
147   sensitive, [[State: sensitive]]
148   showing, [[State: showing]]
149   single_line, [[State: single line]]
150   stale, [[State: stale]]
151   transient, [[State: transient]]
152   vertical, [[State: vertical]]
153   visible, [[State: visible]]
154   manages_descendants, [[State: manage descendants]]
155   indeterminate, [[State: indeterminate]]
156   required, [[State: required]]
157   truncated, [[State: truncated]]
158   animated, [[State: animated]]
159   invalid_entry, [[State: invalid entry]]
160   supports_autocompletion, [[State: supports autocompletion]]
161   selectable_text, [[State: selectable text]]
162   is_default, [[State: is default]]
163   visited, [[State: visited]]
164   last_defined,  [[Last enum entry sentinel]]
165}
166
167enum @beta Efl.Access.Relation_Type
168{
169   [[Describes the relationship between two objects.]]
170   null, [[No relation]]
171   label_for, [[Label for relation]]
172   labelled_by, [[Labelled by relation]]
173   controller_for, [[Controller for relation]]
174   controlled_by, [[Controlled by relation]]
175   member_of, [[Member of relation]]
176   tooltip_for, [[Tooltip for relation]]
177   node_child_of, [[Node child of relation]]
178   node_parent_of, [[Node parent of relation]]
179   extended, [[Extended relation]]
180   flows_to, [[Flows to relation]]
181   flows_from, [[Flows from relation]]
182   subwindow_of, [[Subwindow of relation]]
183   embeds, [[Embeds relation]]
184   embedded_by, [[Embedded by relation]]
185   popup_for, [[Popup for relation]]
186   parent_window_of, [[Parent window of relation]]
187   description_for, [[Description for relation]]
188   described_by, [[Described by relation]]
189   last_defined, [[Last enum entry sentinel]]
190}
191
192enum @beta Efl.Access.Reading.Info.Type
193{
194   [[The accessible Reading information type that can be read.]]
195   name = 1 << 0, [[Name should be read]]
196   role = 1 << 1, [[Role should be read]]
197   description = 1 << 2, [[description should be read.]]
198   state = 1 << 3, [[State should be read.]]
199}
200
201type @beta Efl.Access.State_Set: uint64; [[Accessibility object state set.]]
202
203struct @beta Efl.Access.Event.Handler; [[Accessibility event listener]]
204
205struct @beta Efl.Access.Event.State_Changed.Data
206{
207   [[Accessibility state changed event data]]
208   type: Efl.Access.State_Type; [[Type of the state changed event]]
209   new_value: bool; [[New value]]
210}
211
212struct @beta Efl.Access.Event.Geometry_Changed.Data
213{
214   [[Accessibility geometry changed event data]]
215   x: int; [[X coordinate]]
216   y: int; [[Y coordinate]]
217   width: int; [[Width]]
218   height: int; [[Height]]
219}
220
221struct @beta Efl.Access.Event.Children_Changed.Data
222{
223   [[Accessibility children changed event data]]
224   is_added: bool; [[Child is added or not]]
225   child: Efl.Object; [[Child object]]
226}
227
228struct @beta @free(efl_access_attribute_free) Efl.Access.Attribute
229{
230   [[Accessibility Attribute]]
231   key: string; [[Attribute key]]
232   value: string; [[Attribute value]]
233}
234
235struct @beta Efl.Access.Relation
236{
237   [[Accessibility Relation]]
238   type: Efl.Access.Relation_Type; [[Relation type]]
239   objects: list<Efl.Object>; [[List with relation objects]]
240}
241
242mixin @beta Efl.Access.Object requires Efl.Object
243{
244   [[Accessibility accessible mixin]]
245   c_prefix: efl_access_object;
246   data: Efl_Access_Object_Data;
247   methods {
248      @property localized_role_name @protected @beta {
249         [[Gets an localized string describing accessible object role name.]]
250         get {
251         }
252         values {
253            localized_name: string; [[Localized accessible object role name]]
254         }
255      }
256      @property i18n_name @beta {
257         [[Accessible name of the object.]]
258         get {
259         }
260         set {
261         }
262         values {
263            i18n_name: string; [[Accessible name]]
264         }
265      }
266      relations_get @protected @beta @const {
267         [[Gets an all relations between accessible object and other accessible objects.]]
268         return: iterator<Efl.Access.Relation> @move; [[Accessible relation set]]
269      }
270      @property role @beta {
271         [[The role of the object in accessibility domain.]]
272         get {
273         }
274         set {
275         }
276         values {
277            role: Efl.Access.Role; [[Accessible role]]
278         }
279      }
280      @property access_children @protected @beta {
281         [[Gets object's accessible children.]]
282         get {
283         }
284         values {
285            children: list<Efl.Access.Object> @move; [[List of widget's children]]
286         }
287      }
288      @property role_name @protected @beta {
289         [[Gets human-readable string identifying object accessibility role.]]
290         get {
291         }
292         values {
293            role_name: string; [[Accessible role name]]
294         }
295      }
296      @property attributes @protected @beta {
297         [[Gets key-value pairs identifying object extra attributes. Must be free by a user.]]
298         get {
299         }
300         values {
301            attributes: list<Efl.Access.Attribute> @move; [[List of object attributes.
302                                                                         Must be freed by the user]]
303         }
304      }
305      attribute_append {
306         [[Add key-value pair identifying object extra attributes
307         ]]
308         params {
309            @in key: string; [[The string key to give extra information]]
310            @in value: string; [[The string value to give extra information]]
311         }
312      }
313      attribute_del {
314         [[delete key-value pair identifying object extra attributes when key is given
315         ]]
316         params {
317            @in key: string; [[The string key to identify the key-value pair]]
318         }
319      }
320      attributes_clear {
321         [[Removes all attributes in accessible object.]]
322      }
323      @property reading_info_type @protected {
324         [[Reading information of an accessible object.
325
326           If no reading information is set, 0 is returned which means all four reading information types will be
327           read from object highlight.
328           If set to 0, existing reading info will be deleted.]]
329         get {
330         }
331         set {
332         }
333         values {
334            reading_info: Efl.Access.Reading.Info.Type; [[Reading information types]]
335         }
336      }
337      @property index_in_parent @protected @beta {
338         [[Gets index of the child in parent's children list.]]
339         get {
340         }
341         values {
342            idx: int; [[Index in children list]]
343         }
344      }
345      @property description @beta {
346         [[Contextual information about object.]]
347         get {
348         }
349         set {
350         }
351         values {
352            description: string; [[Accessible contextual information]]
353         }
354      }
355      @property state_set @protected @beta {
356         [[Gets set describing object accessible states.]]
357         get {
358         }
359         values {
360            states: Efl.Access.State_Set; [[Accessible state set]]
361         }
362      }
363      event_handler_add @static @protected @beta {
364         [[Register accessibility event listener]]
365         params {
366              @in cb: Efl.Event_Cb; [[Callback]]
367              @in data: void_ptr; [[Data]]
368         }
369         return: ptr(Efl.Access.Event.Handler); [[Event handler]]
370      }
371      event_handler_del @static @protected @beta {
372         [[Deregister accessibility event listener]]
373         params {
374              @in handler: ptr(Efl.Access.Event.Handler); [[Event handler]]
375         }
376      }
377      event_emit @static @protected @beta {
378          [[Emit event]]
379         params {
380            @in accessible: Efl.Access.Object; [[Accessibility object.]]
381            @in event: ptr(const(Efl.Event_Description)); [[Accessibility event type.]]
382            @in event_info: void_ptr; [[Accessibility event details.]]
383         }
384      }
385      @property translation_domain @beta {
386         [[The translation domain of "name" and "description"
387           properties.
388
389           Translation domain should be set if the application wants to support i18n
390           for accessibility "name" and "description" properties.
391
392           When translation domain is set, values of "name" and "description"
393           properties will be translated with the dgettext function using the
394           current translation domain as the "domainname" parameter.
395
396           It is the application developer's responsibility to ensure that
397           translation files are loaded and bound to the translation domain
398           when accessibility is enabled.]]
399         get {
400         }
401         set {
402         }
403         values {
404            domain: string; [[Translation domain]]
405         }
406      }
407      @property access_type @beta {
408           [[Type of accessibility object]]
409           get {
410           }
411           set {
412           }
413           values {
414               type: Efl.Access.Type; [[Object type]]
415           }
416      }
417      relationship_append @beta {
418         [[Defines the relationship between two accessible objects.
419
420           Adds a unique relationship between source object and relation_object of a
421           given type.
422
423           Relationships can be queried by Assistive Technology clients to
424           provide customized feedback, improving overall user experience.
425
426           Relationship_append API is asymmetric, which means that
427           appending, for example, relation EFL_ACCESS_RELATION_TYPE_FLOWS_TO from object A to B,
428           do NOT append relation EFL_ACCESS_RELATION_TYPE_FLOWS_FROM from object B to
429           object A.]]
430         return: bool; [[$true if relationship was successfully appended, $false otherwise]]
431         params {
432            @in type: Efl.Access.Relation_Type; [[Relation type]]
433            @in relation_object: const(Efl.Access.Object); [[Object to relate to]]
434         }
435      }
436      relationship_remove @beta {
437         [[Removes the relationship between two accessible objects.
438
439          If relation_object is $NULL function removes all relations
440          of the given type.
441         ]]
442         params {
443            @in type: Efl.Access.Relation_Type; [[Relation type]]
444            @in relation_object: const(Efl.Access.Object); [[Object to remove relation from]]
445         }
446      }
447      relationships_clear @beta {
448         [[Removes all relationships in accessible object.]]
449      }
450      @property access_root @static @beta {
451         [[Root object of accessible object hierarchy]]
452         get {
453            values {
454               ret: Efl.Object; [[Root object]]
455            }
456         }
457      }
458   }
459   implements {
460      Efl.Object.destructor;
461      Efl.Object.invalidate;
462      Efl.Object.provider_find;
463   }
464   events {
465      property,changed: string; [[Called when property has changed]]
466      children,changed: Efl.Access.Event.Children_Changed.Data; [[Called when children have changed]]
467      state,changed: Efl.Access.Event.State_Changed.Data; [[Called when state has changed]]
468      bounds,changed: Efl.Access.Event.Geometry_Changed.Data; [[Called when boundaries have changed]]
469      visible,data,changed: void; [[Called when visibility has changed]]
470      active,descendant,changed: Efl.Object; [[Called when active state of descendant has changed]]
471      added: void; [[Called when item is added]]
472      removed: void; [[Called when item is removed]]
473   }
474}
475