Add ICU message format support
[chromium-blink-merge.git] / ui / accessibility / ax_enums.idl
blobf8927292d40e601536320432720a8bfd1a1876e3
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // These should be kept in sync with third_party/WebKit/public/web/WebAXEnums.h
6 // until the Chromium and Blink trees are merged.
7 [camel_case_enum_to_string=true] namespace ui {
9 // For new entries to the following three enums, also add to
10 // chrome/common/extensions/api/automation.idl.
12 // Explanation of the comments next to these events:
14 // Web: this event is only used in web content. Unless a specific platform
15 // is specified, it fires a native event on multiple platforms.
17 // Native: this event is only used in native UI.
19 // Implicit: it would be cleaner if we just updated the AX node
20 // and each platform fired the appropriate events to indicate which
21 // platform-specific attributes changed.
23 // If unspecified, the event is used across web and native on multiple
24 // platforms.
25 enum AXEvent {
26 activedescendantchanged, // Web
27 alert,
28 aria_attribute_changed, // Implicit
29 autocorrection_occured, // Unknown: http://crbug.com/392498
30 blur, // Remove: http://crbug.com/392502
31 checked_state_changed, // Implicit
32 children_changed,
33 focus,
34 hide, // Remove: http://crbug.com/392502
35 hover,
36 invalid_status_changed, // Implicit
37 layout_complete, // Web
38 live_region_changed, // Web
39 load_complete, // Web
40 location_changed, // Web
41 menu_end, // Native / Win
42 menu_list_item_selected, // Web
43 menu_list_value_changed, // Web
44 menu_popup_end, // Native / Win
45 menu_popup_start, // Native / Win
46 menu_start, // Native / Win
47 row_collapsed, // Web / Mac
48 row_count_changed, // Web / Mac
49 row_expanded, // Web / Mac
50 scroll_position_changed, // Web
51 scrolled_to_anchor, // Web
52 selected_children_changed, // Web
53 selection, // Native
54 selection_add, // Native
55 selection_remove, // Native
56 show, // Remove: http://crbug.com/392502
57 text_changed,
58 text_selection_changed,
59 tree_changed, // Accessibility tree changed. Don't
60 // explicitly fire an accessibility event,
61 // only implicitly due to the change.
62 value_changed
65 enum AXRole {
66 alert_dialog,
67 alert,
68 annotation,
69 application,
70 article,
71 banner,
72 blockquote,
73 busy_indicator,
74 button,
75 button_drop_down,
76 canvas,
77 caption,
78 cell,
79 check_box,
80 client,
81 color_well,
82 column_header,
83 column,
84 combo_box,
85 complementary,
86 content_info,
87 date,
88 date_time,
89 definition,
90 description_list_detail,
91 description_list,
92 description_list_term,
93 desktop,
94 details,
95 dialog,
96 directory,
97 disclosure_triangle,
98 div,
99 document,
100 embedded_object,
101 figcaption,
102 figure,
103 footer,
104 form,
105 grid,
106 group,
107 heading,
108 iframe,
109 iframe_presentational,
110 ignored,
111 image_map_link,
112 image_map,
113 image,
114 inline_text_box,
115 input_time,
116 label_text,
117 legend,
118 line_break,
119 link,
120 list_box_option,
121 list_box,
122 list_item,
123 list_marker,
124 list,
125 location_bar,
126 log,
127 main,
128 mark,
129 marquee,
130 math,
131 menu_bar,
132 menu_button,
133 menu_item,
134 menu_item_check_box,
135 menu_item_radio,
136 menu_list_option,
137 menu_list_popup,
138 menu,
139 meter,
140 navigation,
141 note,
142 outline,
143 pane,
144 paragraph,
145 pop_up_button,
146 pre,
147 presentational,
148 progress_indicator,
149 radio_button,
150 radio_group,
151 region,
152 root_web_area,
153 row_header,
154 row,
155 ruby,
156 ruler,
157 svg_root,
158 scroll_area,
159 scroll_bar,
160 seamless_web_area,
161 search,
162 search_box,
163 slider,
164 slider_thumb,
165 spin_button_part,
166 spin_button,
167 splitter,
168 static_text,
169 status,
170 switch,
171 tab_group,
172 tab_list,
173 tab_panel,
174 tab,
175 table_header_container,
176 table,
177 text_field,
178 time,
179 timer,
180 title_bar,
181 toggle_button,
182 toolbar,
183 tree_grid,
184 tree_item,
185 tree,
186 unknown,
187 tooltip,
188 web_area,
189 web_view,
190 window
193 // TODO(dmazzoni): switch content/ to use AX_STATE_DISABLED instead of
194 // !AX_STATE_ENABLED, and AX_STATE_EDITABLE instead of !AX_STATE_READONLY.
195 enum AXState {
196 busy,
197 checked,
198 collapsed,
199 default,
200 disabled, // ui/views only
201 editable, // ui/views only
202 enabled, // content only
203 expanded,
204 focusable,
205 focused,
206 haspopup,
207 horizontal,
208 hovered,
209 indeterminate,
210 invisible,
211 linked,
212 multiline,
213 multiselectable,
214 offscreen,
215 pressed,
216 protected,
217 read_only,
218 required,
219 selectable,
220 selected,
221 vertical,
222 visited
225 // A change to the accessibility tree.
226 enum AXMutation {
227 node_created,
228 subtree_created,
229 node_changed,
230 node_removed
233 [cpp_enum_prefix_override="ax_attr"] enum AXStringAttribute {
234 // Document attributes.
235 doc_url,
236 doc_title,
237 doc_mimetype,
238 doc_doctype,
240 // Attributes that could apply to any node.
241 access_key,
242 action,
243 auto_complete,
244 container_live_relevant,
245 container_live_status,
246 description,
247 display,
248 help,
249 html_tag,
250 // Only used when invalid_state == invalid_state_other.
251 aria_invalid_value,
252 name,
253 live_relevant,
254 live_status,
255 placeholder,
256 role,
257 shortcut,
258 url,
259 value
262 [cpp_enum_prefix_override="ax_attr"] enum AXIntAttribute {
263 // Scrollable container attributes.
264 scroll_x,
265 scroll_x_min,
266 scroll_x_max,
267 scroll_y,
268 scroll_y_min,
269 scroll_y_max,
271 // Editable text attributes.
272 text_sel_start,
273 text_sel_end,
275 // Table attributes.
276 table_row_count,
277 table_column_count,
278 table_header_id,
280 // Table row attributes.
281 table_row_index,
282 table_row_header_id,
284 // Table column attributes.
285 table_column_index,
286 table_column_header_id,
288 // Table cell attributes.
289 table_cell_column_index,
290 table_cell_column_span,
291 table_cell_row_index,
292 table_cell_row_span,
293 sort_direction,
295 // Tree control attributes.
296 hierarchical_level,
298 // Relationships between this element and other elements.
299 title_ui_element,
300 activedescendant_id,
302 // Uniquely identifies an AXTree.
303 tree_id,
305 // Identifies a child tree which this node hosts.
306 child_tree_id,
308 // Identifies the parent tree that hosts this tree's root node.
309 parent_tree_id,
311 // Position or Number of items in current set of listitems or treeitems
312 set_size,
313 pos_in_set,
315 // In the case of AX_ROLE_COLOR_WELL, specifies the selected color.
316 color_value,
319 // Text attributes.
321 // Foreground and background color in RGBA.
322 background_color,
323 color,
325 // Indicates if a form control has invalid input or
326 // if an element has an aria-invalid attribute.
327 invalid_state,
329 // Specifies the direction of the text, e.g., right-to-left.
330 text_direction,
332 // Bold, italic, underline, etc.
333 text_style
336 [cpp_enum_prefix_override="ax_attr"] enum AXFloatAttribute {
337 // Document attributes.
338 doc_loading_progress,
340 // Range attributes.
341 value_for_range,
342 min_value_for_range,
343 max_value_for_range,
345 // Text attributes.
346 // Font size is in pixels.
347 font_size
350 [cpp_enum_prefix_override="ax_attr"] enum AXBoolAttribute {
351 // Document attributes.
352 doc_loaded,
354 // True if a checkbox or radio button is in the "mixed" state.
355 button_mixed,
357 // Live region attributes.
358 container_live_atomic,
359 container_live_busy,
360 live_atomic,
361 live_busy,
363 // ARIA readonly flag.
364 aria_readonly,
366 // Writeable attributes
367 can_set_value,
369 // If this is set, all of the other fields in this struct should
370 // be ignored and only the locations should change.
371 update_location_only,
373 // Set on a canvas element if it has fallback content.
374 canvas_has_fallback
377 [cpp_enum_prefix_override="ax_attr"] enum AXIntListAttribute {
378 // Ids of nodes that are children of this node logically, but are
379 // not children of this node in the tree structure. As an example,
380 // a table cell is a child of a row, and an 'indirect' child of a
381 // column.
382 indirect_child_ids,
384 // Relationships between this element and other elements.
385 controls_ids,
386 describedby_ids,
387 flowto_ids,
388 labelledby_ids,
389 owns_ids,
391 // Character indices where line breaks occur.
392 line_breaks,
394 // For a table, the cell ids in row-major order, with duplicate entries
395 // when there's a rowspan or colspan, and with -1 for missing cells.
396 // There are always exactly rows * columns entries.
397 cell_ids,
399 // For a table, the unique cell ids in row-major order of their first
400 // occurrence.
401 unique_cell_ids,
403 // For inline text. This is the pixel position of the end of this
404 // character within the bounding rectangle of this object, in the
405 // direction given by AX_ATTR_TEXT_DIRECTION. For example, for left-to-right
406 // text, the first offset is the right coordinate of the first character
407 // within the object's bounds, the second offset is the right coordinate
408 // of the second character, and so on.
409 character_offsets,
411 // For inline text. These int lists must be the same size; they represent
412 // the start and end character index of each word within this text.
413 word_starts,
414 word_ends
417 [cpp_enum_prefix_override="ax"] enum AXTextDirection {
418 text_direction_ltr,
419 text_direction_rtl,
420 text_direction_ttb,
421 text_direction_btt
424 // A Java counterpart will be generated for this enum.
425 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.ui.accessibility
426 [cpp_enum_prefix_override="ax"] enum AXTextStyle {
427 text_style_bold = 1,
428 text_style_italic = 2,
429 text_style_underline = 4,
430 text_style_line_through = 8
433 [cpp_enum_prefix_override="ax"] enum AXInvalidState {
434 invalid_state_false,
435 invalid_state_true,
436 invalid_state_spelling,
437 invalid_state_grammar,
438 invalid_state_other
441 [cpp_enum_prefix_override="ax"] enum AXSortDirection {
442 sort_direction_unsorted,
443 sort_direction_ascending,
444 sort_direction_descending,
445 sort_direction_other