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. 4 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 { 8 9 // For new entries to the following three enums, also add to 10 // chrome/common/extensions/apis/automation.idl. 11 enum AXEvent { 12 activedescendantchanged, 13 alert, 14 aria_attribute_changed, 15 autocorrection_occured, 16 blur, 17 checked_state_changed, 18 children_changed, 19 focus, 20 hide, 21 hover, 22 invalid_status_changed, 23 layout_complete, 24 live_region_changed, 25 load_complete, 26 location_changed, 27 menu_end, 28 menu_list_item_selected, 29 menu_list_value_changed, 30 menu_popup_end, 31 menu_popup_start, 32 menu_start, 33 row_collapsed, 34 row_count_changed, 35 row_expanded, 36 scroll_position_changed, 37 scrolled_to_anchor, 38 selected_children_changed, 39 selected_text_changed, 40 selection_changed, 41 show, 42 text_changed, 43 text_inserted, 44 text_removed, 45 value_changed 46 }; 47 48 enum AXRole { 49 alert_dialog, 50 alert, 51 annotation, 52 application, 53 article, 54 banner, 55 browser, 56 busy_indicator, 57 button, 58 button_drop_down, 59 canvas, 60 cell, 61 check_box, 62 client, 63 color_well, 64 column_header, 65 column, 66 combo_box, 67 complementary, 68 content_info, 69 definition, 70 description_list_detail, 71 description_list_term, 72 desktop, 73 dialog, 74 directory, 75 disclosure_triangle, 76 div, 77 document, 78 drawer, 79 editable_text, 80 embedded_object, 81 footer, 82 form, 83 grid, 84 group, 85 grow_area, 86 heading, 87 help_tag, 88 horizontal_rule, 89 iframe, 90 ignored, 91 image_map_link, 92 image_map, 93 image, 94 incrementor, 95 inline_text_box, 96 label_text, 97 legend, 98 link, 99 list_box_option, 100 list_box, 101 list_item, 102 list_marker, 103 list, 104 location_bar, 105 log, 106 main, 107 marquee, 108 math_element, 109 math, 110 matte, 111 menu_bar, 112 menu_button, 113 menu_item, 114 menu_list_option, 115 menu_list_popup, 116 menu, 117 navigation, 118 note, 119 outline, 120 pane, 121 paragraph, 122 pop_up_button, 123 presentational, 124 progress_indicator, 125 radio_button, 126 radio_group, 127 region, 128 root_web_area, 129 row_header, 130 row, 131 ruler_marker, 132 ruler, 133 svg_root, 134 scroll_area, 135 scroll_bar, 136 seamless_web_area, 137 search, 138 sheet, 139 slider, 140 slider_thumb, 141 spin_button_part, 142 spin_button, 143 split_group, 144 splitter, 145 static_text, 146 status, 147 system_wide, 148 tab_group, 149 tab_list, 150 tab_panel, 151 tab, 152 table_header_container, 153 table, 154 text_area, 155 text_field, 156 timer, 157 title_bar, 158 toggle_button, 159 toolbar, 160 tree_grid, 161 tree_item, 162 tree, 163 unknown, 164 tooltip, 165 value_indicator, 166 web_area, 167 window 168 }; 169 170 // TODO(dmazzoni): switch content/ to use AX_STATE_DISABLED instead of 171 // !AX_STATE_ENABLED, and AX_STATE_EDITABLE instead of !AX_STATE_READONLY. 172 enum AXState { 173 busy, 174 checked, 175 collapsed, 176 default, 177 disabled, // ui/views only 178 editable, // ui/views only 179 enabled, // content only 180 expanded, 181 focusable, 182 focused, 183 haspopup, 184 hovered, 185 indeterminate, 186 invisible, 187 linked, 188 multiselectable, 189 offscreen, 190 pressed, 191 protected, 192 read_only, 193 required, 194 selectable, 195 selected, 196 vertical, 197 visited 198 }; 199 200 [cpp_enum_prefix_override="ax_attr"] enum AXStringAttribute { 201 // Document attributes. 202 doc_url, 203 doc_title, 204 doc_mimetype, 205 doc_doctype, 206 207 // Attributes that could apply to any node. 208 access_key, 209 action, 210 container_live_relevant, 211 container_live_status, 212 description, 213 display, 214 help, 215 html_tag, 216 name, 217 live_relevant, 218 live_status, 219 role, 220 shortcut, 221 url, 222 value 223 }; 224 225 [cpp_enum_prefix_override="ax_attr"] enum AXIntAttribute { 226 // Scrollable container attributes. 227 scroll_x, 228 scroll_x_min, 229 scroll_x_max, 230 scroll_y, 231 scroll_y_min, 232 scroll_y_max, 233 234 // Editable text attributes. 235 text_sel_start, 236 text_sel_end, 237 238 // Table attributes. 239 table_row_count, 240 table_column_count, 241 table_header_id, 242 243 // Table row attributes. 244 table_row_index, 245 table_row_header_id, 246 247 // Table column attributes. 248 table_column_index, 249 table_column_header_id, 250 251 // Table cell attributes. 252 table_cell_column_index, 253 table_cell_column_span, 254 table_cell_row_index, 255 table_cell_row_span, 256 257 // Tree control attributes. 258 hierarchical_level, 259 260 // Relationships between this element and other elements. 261 title_ui_element, 262 activedescendant_id, 263 264 // Color value for AX_ROLE_COLOR_WELL, each component is 0..255 265 color_value_red, 266 color_value_green, 267 color_value_blue, 268 269 // Inline text attributes. 270 text_direction 271 }; 272 273 [cpp_enum_prefix_override="ax_attr"] enum AXFloatAttribute { 274 // Document attributes. 275 doc_loading_progress, 276 277 // Range attributes. 278 value_for_range, 279 min_value_for_range, 280 max_value_for_range 281 }; 282 283 [cpp_enum_prefix_override="ax_attr"] enum AXBoolAttribute { 284 // Document attributes. 285 doc_loaded, 286 287 // True if a checkbox or radio button is in the "mixed" state. 288 button_mixed, 289 290 // Live region attributes. 291 container_live_atomic, 292 container_live_busy, 293 live_atomic, 294 live_busy, 295 296 // ARIA readonly flag. 297 aria_readonly, 298 299 // Writeable attributes 300 can_set_value, 301 302 // If this is set, all of the other fields in this struct should 303 // be ignored and only the locations should change. 304 update_location_only, 305 306 // Set on a canvas element if it has fallback content. 307 canvas_has_fallback 308 }; 309 310 [cpp_enum_prefix_override="ax_attr"] enum AXIntListAttribute { 311 // Ids of nodes that are children of this node logically, but are 312 // not children of this node in the tree structure. As an example, 313 // a table cell is a child of a row, and an 'indirect' child of a 314 // column. 315 indirect_child_ids, 316 317 // Relationships between this element and other elements. 318 controls_ids, 319 describedby_ids, 320 flowto_ids, 321 labelledby_ids, 322 owns_ids, 323 324 // Character indices where line breaks occur. 325 line_breaks, 326 327 // For a table, the cell ids in row-major order, with duplicate entries 328 // when there's a rowspan or colspan, and with -1 for missing cells. 329 // There are always exactly rows * columns entries. 330 cell_ids, 331 332 // For a table, the unique cell ids in row-major order of their first 333 // occurrence. 334 unique_cell_ids, 335 336 // For inline text. This is the pixel position of the end of this 337 // character within the bounding rectangle of this object, in the 338 // direction given by AX_ATTR_TEXT_DIRECTION. For example, for left-to-right 339 // text, the first offset is the right coordinate of the first character 340 // within the object's bounds, the second offset is the right coordinate 341 // of the second character, and so on. 342 character_offsets, 343 344 // For inline text. These int lists must be the same size; they represent 345 // the start and end character index of each word within this text. 346 word_starts, 347 word_ends 348 }; 349 350 [cpp_enum_prefix_override="ax"] enum AXTextDirection { 351 text_direction_lr, 352 text_direction_rl, 353 text_direction_tb, 354 text_direction_bt 355 }; 356}; 357