Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Side by Side Diff: ui/accessibility/ax_enums.h

Issue 143473003: Generate ax enums from idl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Caught Blink enum conversion bug! Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/accessibility/accessibility.gyp ('k') | ui/accessibility/ax_enums.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 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 #ifndef UI_ACCESSIBILITY_AX_ENUMS_H_
6 #define UI_ACCESSIBILITY_AX_ENUMS_H_
7
8 #include "base/basictypes.h"
9
10 namespace ui {
11
12 // These should be kept in sync with third_party/WebKit/public/web/WebAXEnums.h
13 // until the Chromium and Blink trees are merged.
14
15 enum AXEvent {
16 AX_EVENT_ACTIVEDESCENDANTCHANGED,
17 AX_EVENT_ALERT,
18 AX_EVENT_ARIA_ATTRIBUTE_CHANGED,
19 AX_EVENT_AUTOCORRECTION_OCCURED,
20 AX_EVENT_BLUR,
21 AX_EVENT_CHECKED_STATE_CHANGED,
22 AX_EVENT_CHILDREN_CHANGED,
23 AX_EVENT_FOCUS,
24 AX_EVENT_HIDE,
25 AX_EVENT_INVALID_STATUS_CHANGED,
26 AX_EVENT_LAYOUT_COMPLETE,
27 AX_EVENT_LIVE_REGION_CHANGED,
28 AX_EVENT_LOAD_COMPLETE,
29 AX_EVENT_LOCATION_CHANGED,
30 AX_EVENT_MENU_LIST_ITEM_SELECTED,
31 AX_EVENT_MENU_LIST_VALUE_CHANGED,
32 AX_EVENT_ROW_COLLAPSED,
33 AX_EVENT_ROW_COUNT_CHANGED,
34 AX_EVENT_ROW_EXPANDED,
35 AX_EVENT_SCROLLED_TO_ANCHOR,
36 AX_EVENT_SELECTED_CHILDREN_CHANGED,
37 AX_EVENT_SELECTED_TEXT_CHANGED,
38 AX_EVENT_SHOW,
39 AX_EVENT_TEXT_CHANGED,
40 AX_EVENT_TEXT_INSERTED,
41 AX_EVENT_TEXT_REMOVED,
42 AX_EVENT_VALUE_CHANGED
43 };
44
45 enum AXRole {
46 AX_ROLE_ALERT_DIALOG = 1,
47 AX_ROLE_ALERT,
48 AX_ROLE_ANNOTATION,
49 AX_ROLE_APPLICATION,
50 AX_ROLE_ARTICLE,
51 AX_ROLE_BANNER,
52 AX_ROLE_BROWSER,
53 AX_ROLE_BUSY_INDICATOR,
54 AX_ROLE_BUTTON,
55 AX_ROLE_CANVAS,
56 AX_ROLE_CELL,
57 AX_ROLE_CHECK_BOX,
58 AX_ROLE_COLOR_WELL,
59 AX_ROLE_COLUMN_HEADER,
60 AX_ROLE_COLUMN,
61 AX_ROLE_COMBO_BOX,
62 AX_ROLE_COMPLEMENTARY,
63 AX_ROLE_CONTENT_INFO,
64 AX_ROLE_DEFINITION,
65 AX_ROLE_DESCRIPTION_LIST_DETAIL,
66 AX_ROLE_DESCRIPTION_LIST_TERM,
67 AX_ROLE_DIALOG,
68 AX_ROLE_DIRECTORY,
69 AX_ROLE_DISCLOSURE_TRIANGLE,
70 AX_ROLE_DIV,
71 AX_ROLE_DOCUMENT,
72 AX_ROLE_DRAWER,
73 AX_ROLE_EDITABLE_TEXT,
74 AX_ROLE_FOOTER,
75 AX_ROLE_FORM,
76 AX_ROLE_GRID,
77 AX_ROLE_GROUP,
78 AX_ROLE_GROW_AREA,
79 AX_ROLE_HEADING,
80 AX_ROLE_HELP_TAG,
81 AX_ROLE_HORIZONTAL_RULE,
82 AX_ROLE_IGNORED,
83 AX_ROLE_IMAGE_MAP_LINK,
84 AX_ROLE_IMAGE_MAP,
85 AX_ROLE_IMAGE,
86 AX_ROLE_INCREMENTOR,
87 AX_ROLE_INLINE_TEXT_BOX,
88 AX_ROLE_LABEL,
89 AX_ROLE_LEGEND,
90 AX_ROLE_LINK,
91 AX_ROLE_LIST_BOX_OPTION,
92 AX_ROLE_LIST_BOX,
93 AX_ROLE_LIST_ITEM,
94 AX_ROLE_LIST_MARKER,
95 AX_ROLE_LIST,
96 AX_ROLE_LOG,
97 AX_ROLE_MAIN,
98 AX_ROLE_MARQUEE,
99 AX_ROLE_MATH_ELEMENT,
100 AX_ROLE_MATH,
101 AX_ROLE_MATTE,
102 AX_ROLE_MENU_BAR,
103 AX_ROLE_MENU_BUTTON,
104 AX_ROLE_MENU_ITEM,
105 AX_ROLE_MENU_LIST_OPTION,
106 AX_ROLE_MENU_LIST_POPUP,
107 AX_ROLE_MENU,
108 AX_ROLE_NAVIGATION,
109 AX_ROLE_NOTE,
110 AX_ROLE_OUTLINE,
111 AX_ROLE_PARAGRAPH,
112 AX_ROLE_POP_UP_BUTTON,
113 AX_ROLE_PRESENTATIONAL,
114 AX_ROLE_PROGRESS_INDICATOR,
115 AX_ROLE_RADIO_BUTTON,
116 AX_ROLE_RADIO_GROUP,
117 AX_ROLE_REGION,
118 AX_ROLE_ROOT_WEB_AREA,
119 AX_ROLE_ROW_HEADER,
120 AX_ROLE_ROW,
121 AX_ROLE_RULER_MARKER,
122 AX_ROLE_RULER,
123 AX_ROLE_SVG_ROOT,
124 AX_ROLE_SCROLL_AREA,
125 AX_ROLE_SCROLL_BAR,
126 AX_ROLE_SEAMLESS_WEB_AREA,
127 AX_ROLE_SEARCH,
128 AX_ROLE_SHEET,
129 AX_ROLE_SLIDER,
130 AX_ROLE_SLIDER_THUMB,
131 AX_ROLE_SPIN_BUTTON_PART,
132 AX_ROLE_SPIN_BUTTON,
133 AX_ROLE_SPLIT_GROUP,
134 AX_ROLE_SPLITTER,
135 AX_ROLE_STATIC_TEXT,
136 AX_ROLE_STATUS,
137 AX_ROLE_SYSTEM_WIDE,
138 AX_ROLE_TAB_GROUP,
139 AX_ROLE_TAB_LIST,
140 AX_ROLE_TAB_PANEL,
141 AX_ROLE_TAB,
142 AX_ROLE_TABLE_HEADER_CONTAINER,
143 AX_ROLE_TABLE,
144 AX_ROLE_TEXT_AREA,
145 AX_ROLE_TEXT_FIELD,
146 AX_ROLE_TIMER,
147 AX_ROLE_TOGGLE_BUTTON,
148 AX_ROLE_TOOLBAR,
149 AX_ROLE_TREE_GRID,
150 AX_ROLE_TREE_ITEM,
151 AX_ROLE_TREE,
152 AX_ROLE_UNKNOWN,
153 AX_ROLE_TOOLTIP,
154 AX_ROLE_VALUE_INDICATOR,
155 AX_ROLE_WEB_AREA,
156 AX_ROLE_WINDOW
157 };
158
159 enum AXState {
160 AX_STATE_BUSY,
161 AX_STATE_CHECKED,
162 AX_STATE_COLLAPSED,
163 AX_STATE_ENABLED,
164 AX_STATE_EXPANDED,
165 AX_STATE_FOCUSABLE,
166 AX_STATE_FOCUSED,
167 AX_STATE_HASPOPUP,
168 AX_STATE_HOVERED,
169 AX_STATE_INDETERMINATE,
170 AX_STATE_INVISIBLE,
171 AX_STATE_LINKED,
172 AX_STATE_MULTISELECTABLE,
173 AX_STATE_OFFSCREEN,
174 AX_STATE_PRESSED,
175 AX_STATE_PROTECTED,
176 AX_STATE_READONLY,
177 AX_STATE_REQUIRED,
178 AX_STATE_SELECTABLE,
179 AX_STATE_SELECTED,
180 AX_STATE_VERTICAL,
181 AX_STATE_VISITED
182 };
183
184 enum AXStringAttribute {
185 // Document attributes.
186 AX_ATTR_DOC_URL,
187 AX_ATTR_DOC_TITLE,
188 AX_ATTR_DOC_MIMETYPE,
189 AX_ATTR_DOC_DOCTYPE,
190
191 // Attributes that could apply to any node.
192 AX_ATTR_ACCESS_KEY,
193 AX_ATTR_ACTION,
194 AX_ATTR_CONTAINER_LIVE_RELEVANT,
195 AX_ATTR_CONTAINER_LIVE_STATUS,
196 AX_ATTR_DESCRIPTION,
197 AX_ATTR_DISPLAY,
198 AX_ATTR_HELP,
199 AX_ATTR_HTML_TAG,
200 AX_ATTR_NAME,
201 AX_ATTR_LIVE_RELEVANT,
202 AX_ATTR_LIVE_STATUS,
203 AX_ATTR_ROLE,
204 AX_ATTR_SHORTCUT,
205 AX_ATTR_URL,
206 AX_ATTR_VALUE,
207 };
208
209 enum AXIntAttribute {
210 // Scrollable container attributes.
211 AX_ATTR_SCROLL_X,
212 AX_ATTR_SCROLL_X_MIN,
213 AX_ATTR_SCROLL_X_MAX,
214 AX_ATTR_SCROLL_Y,
215 AX_ATTR_SCROLL_Y_MIN,
216 AX_ATTR_SCROLL_Y_MAX,
217
218 // Editable text attributes.
219 AX_ATTR_TEXT_SEL_START,
220 AX_ATTR_TEXT_SEL_END,
221
222 // Table attributes.
223 AX_ATTR_TABLE_ROW_COUNT,
224 AX_ATTR_TABLE_COLUMN_COUNT,
225 AX_ATTR_TABLE_HEADER_ID,
226
227 // Table row attributes.
228 AX_ATTR_TABLE_ROW_INDEX,
229 AX_ATTR_TABLE_ROW_HEADER_ID,
230
231 // Table column attributes.
232 AX_ATTR_TABLE_COLUMN_INDEX,
233 AX_ATTR_TABLE_COLUMN_HEADER_ID,
234
235 // Table cell attributes.
236 AX_ATTR_TABLE_CELL_COLUMN_INDEX,
237 AX_ATTR_TABLE_CELL_COLUMN_SPAN,
238 AX_ATTR_TABLE_CELL_ROW_INDEX,
239 AX_ATTR_TABLE_CELL_ROW_SPAN,
240
241 // Tree control attributes.
242 AX_ATTR_HIERARCHICAL_LEVEL,
243
244 // Relationships between this element and other elements.
245 AX_ATTR_TITLE_UI_ELEMENT,
246
247 // Color value for AX_ROLE_COLOR_WELL, each component is 0..255
248 AX_ATTR_COLOR_VALUE_RED,
249 AX_ATTR_COLOR_VALUE_GREEN,
250 AX_ATTR_COLOR_VALUE_BLUE,
251
252 // Inline text attributes.
253 AX_ATTR_TEXT_DIRECTION
254 };
255
256 enum AXFloatAttribute {
257 // Document attributes.
258 AX_ATTR_DOC_LOADING_PROGRESS,
259
260 // Range attributes.
261 AX_ATTR_VALUE_FOR_RANGE,
262 AX_ATTR_MIN_VALUE_FOR_RANGE,
263 AX_ATTR_MAX_VALUE_FOR_RANGE,
264 };
265
266 enum AXBoolAttribute {
267 // Document attributes.
268 AX_ATTR_DOC_LOADED,
269
270 // True if a checkbox or radio button is in the "mixed" state.
271 AX_ATTR_BUTTON_MIXED,
272
273 // Live region attributes.
274 AX_ATTR_CONTAINER_LIVE_ATOMIC,
275 AX_ATTR_CONTAINER_LIVE_BUSY,
276 AX_ATTR_LIVE_ATOMIC,
277 AX_ATTR_LIVE_BUSY,
278
279 // ARIA readonly flag.
280 AX_ATTR_ARIA_READONLY,
281
282 // Writeable attributes
283 AX_ATTR_CAN_SET_VALUE,
284
285 // If this is set, all of the other fields in this struct should
286 // be ignored and only the locations should change.
287 AX_ATTR_UPDATE_LOCATION_ONLY,
288
289 // Set on a canvas element if it has fallback content.
290 AX_ATTR_CANVAS_HAS_FALLBACK,
291 };
292
293 enum AXIntListAttribute {
294 // Ids of nodes that are children of this node logically, but are
295 // not children of this node in the tree structure. As an example,
296 // a table cell is a child of a row, and an 'indirect' child of a
297 // column.
298 AX_ATTR_INDIRECT_CHILD_IDS,
299
300 // Character indices where line breaks occur.
301 AX_ATTR_LINE_BREAKS,
302
303 // For a table, the cell ids in row-major order, with duplicate entries
304 // when there's a rowspan or colspan, and with -1 for missing cells.
305 // There are always exactly rows * columns entries.
306 AX_ATTR_CELL_IDS,
307
308 // For a table, the unique cell ids in row-major order of their first
309 // occurrence.
310 AX_ATTR_UNIQUE_CELL_IDS,
311
312 // For inline text. This is the pixel position of the end of this
313 // character within the bounding rectangle of this object, in the
314 // direction given by AX_ATTR_TEXT_DIRECTION. For example, for left-to-right
315 // text, the first offset is the right coordinate of the first character
316 // within the object's bounds, the second offset is the right coordinate
317 // of the second character, and so on.
318 AX_ATTR_CHARACTER_OFFSETS,
319
320 // For inline text. These int lists must be the same size; they represent
321 // the start and end character index of each word within this text.
322 AX_ATTR_WORD_STARTS,
323 AX_ATTR_WORD_ENDS,
324 };
325
326 enum AXTextDirection {
327 AX_TEXT_DIRECTION_LR,
328 AX_TEXT_DIRECTION_RL,
329 AX_TEXT_DIRECTION_TB,
330 AX_TEXT_DIRECTION_BT,
331 };
332
333 } // namespace ui
334
335 #endif // UI_ACCESSIBILITY_AX_ENUMS_H_
OLDNEW
« no previous file with comments | « ui/accessibility/accessibility.gyp ('k') | ui/accessibility/ax_enums.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698