Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set expandtab shiftwidth=2 tabstop=2: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef _states_h_
8 #define _states_h_
10 #include <stdint.h>
12 namespace mozilla {
13 namespace a11y {
14 namespace states {
16 /**
17 * The object is disabled, opposite to enabled and sensitive.
18 */
19 const uint64_t UNAVAILABLE = ((uint64_t) 0x1) << 0;
21 /**
22 * The object is selected.
23 */
24 const uint64_t SELECTED = ((uint64_t) 0x1) << 1;
26 /**
27 * The object has the keyboard focus.
28 */
29 const uint64_t FOCUSED = ((uint64_t) 0x1) << 2;
31 /**
32 * The object is pressed.
33 */
34 const uint64_t PRESSED = ((uint64_t) 0x1) << 3;
36 /**
37 * The checkable object is checked, applied to check box controls,
38 * @see CHECKABLE and MIXED states.
39 */
40 const uint64_t CHECKED = ((uint64_t) 0x1) << 4;
42 /**
43 * Indicates that the state of a three-state check box or tool bar button is
44 * undetermined. The check box is neither checked or unchecked, and is
45 * in the third or mixed state.
46 */
47 const uint64_t MIXED = ((uint64_t) 0x1) << 5;
49 /**
50 * The object is designated read-only, so it can't be edited.
51 */
52 const uint64_t READONLY = ((uint64_t) 0x1) << 6;
54 /**
55 * The object is hot-tracked by the mouse, which means that its appearance
56 * has changed to indicate that the mouse pointer is located over it.
57 *
58 * This is currently unused.
59 */
60 const uint64_t HOTTRACKED = ((uint64_t) 0x1) << 7;
62 /**
63 * This object is the default button in a window.
64 */
65 const uint64_t DEFAULT = ((uint64_t) 0x1) << 8;
67 /**
68 * The expandable object's children are displayed, the opposite of collapsed,
69 * applied to trees, list and other controls.
70 * @see COLLAPSED state
71 */
72 const uint64_t EXPANDED = ((uint64_t) 0x1) << 9;
74 /**
75 * The expandable object's children are not displayed, the opposite of
76 * expanded, applied to tree lists and other controls,
77 * @see EXPANDED state.
78 */
79 const uint64_t COLLAPSED = ((uint64_t) 0x1) << 10;
81 /**
82 * The control or document can not accept input at this time.
83 */
84 const uint64_t BUSY = ((uint64_t) 0x1) << 11;
86 /**
87 * The object is out of normal flow, may be outside of boundaries of its
88 * parent.
89 */
90 const uint64_t FLOATING = ((uint64_t) 0x1) << 12;
92 /**
93 * The object can be checked.
94 */
95 const uint64_t CHECKABLE = ((uint64_t) 0x1) << 13;
97 /**
98 * This object is a graphic which is rapidly changing appearance.
99 */
100 const uint64_t ANIMATED = ((uint64_t) 0x1) << 14;
102 /**
103 * The object is programmatically hidden.
104 * So user action like scrolling or switching tabs won't make this visible.
105 */
106 const uint64_t INVISIBLE = ((uint64_t) 0x1) << 15;
108 /**
109 * The object is scrolled off screen.
110 * User action such as scrolling or changing tab may make the object
111 * visible.
112 */
113 const uint64_t OFFSCREEN = ((uint64_t) 0x1) << 16;
115 /**
116 * The object can be resized.
117 */
118 const uint64_t SIZEABLE = ((uint64_t) 0x1) << 17;
120 /**
121 * The object can be moved to a different position.
122 */
123 const uint64_t MOVEABLE = ((uint64_t) 0x1) << 18;
125 /**
126 * The object describes itself with speech.
127 * Other speech related assistive technology may want to avoid speaking
128 * information about this object, because the object is already doing this.
129 */
130 const uint64_t SELFVOICING = ((uint64_t) 0x1) << 19;
132 /**
133 * The object can have the focus and become focused.
134 */
135 const uint64_t FOCUSABLE = ((uint64_t) 0x1) << 20;
137 /**
138 * The object can be selected.
139 */
140 const uint64_t SELECTABLE = ((uint64_t) 0x1) << 21;
142 /**
143 * This object is a link.
144 */
145 const uint64_t LINKED = ((uint64_t) 0x1) << 22;
147 /**
148 * This is used for links that have been traversed
149 * i.e. the linked page has been visited.
150 */
151 const uint64_t TRAVERSED = ((uint64_t) 0x1) << 23;
153 /**
154 * Supports multiple selection.
155 */
156 const uint64_t MULTISELECTABLE = ((uint64_t) 0x1) << 24;
158 /**
159 * Supports extended selection.
160 * All objects supporting this are also multipselectable.
161 * This only makes sense for msaa see bug 635690.
162 */
163 const uint64_t EXTSELECTABLE = ((uint64_t) 0x1) << 25;
165 /**
166 * The user is required to interact with this object.
167 */
168 const uint64_t REQUIRED = ((uint64_t) 0x1) << 26;
170 /**
171 * The object is an alert, notifying the user of something important.
172 */
173 const uint64_t ALERT = ((uint64_t) 0x1) << 27;
175 /**
176 * Used for text fields containing invalid values.
177 */
178 const uint64_t INVALID = ((uint64_t) 0x1) << 28;
180 /**
181 * The controls value can not be obtained, and is returned as a set of "*"s.
182 */
183 const uint64_t PROTECTED = ((uint64_t) 0x1) << 29;
185 /**
186 * The object can be invoked to show a pop up menu or window.
187 */
188 const uint64_t HASPOPUP = ((uint64_t) 0x1) << 30;
190 /**
191 * The editable area has some kind of autocompletion.
192 */
193 const uint64_t SUPPORTS_AUTOCOMPLETION = ((uint64_t) 0x1) << 31;
195 /**
196 * The object is no longer available to be queried.
197 */
198 const uint64_t DEFUNCT = ((uint64_t) 0x1) << 32;
200 /**
201 * The text is selectable, the object must implement the text interface.
202 */
203 const uint64_t SELECTABLE_TEXT = ((uint64_t) 0x1) << 33;
205 /**
206 * The text in this object can be edited.
207 */
208 const uint64_t EDITABLE = ((uint64_t) 0x1) << 34;
210 /**
211 * This window is currently the active window.
212 */
213 const uint64_t ACTIVE = ((uint64_t) 0x1) << 35;
215 /**
216 * Indicates that the object is modal. Modal objects have the behavior
217 * that something must be done with the object before the user can
218 * interact with an object in a different window.
219 */
220 const uint64_t MODAL = ((uint64_t) 0x1) << 36;
222 /**
223 * Edit control that can take multiple lines.
224 */
225 const uint64_t MULTI_LINE = ((uint64_t) 0x1) << 37;
227 /**
228 * Uses horizontal layout.
229 */
230 const uint64_t HORIZONTAL = ((uint64_t) 0x1) << 38;
232 /**
233 * Indicates this object paints every pixel within its rectangular region.
234 */
235 const uint64_t OPAQUE1 = ((uint64_t) 0x1) << 39;
237 /**
238 * This text object can only contain 1 line of text.
239 */
240 const uint64_t SINGLE_LINE = ((uint64_t) 0x1) << 40;
242 /**
243 * The parent object manages descendants, and this object may only exist
244 * while it is visible or has focus.
245 * For example the focused cell of a table or the current element of a list box may have this state.
246 */
247 const uint64_t TRANSIENT = ((uint64_t) 0x1) << 41;
249 /**
250 * Uses vertical layout.
251 * Especially used for sliders and scrollbars.
252 */
253 const uint64_t VERTICAL = ((uint64_t) 0x1) << 42;
255 /**
256 * Object not dead, but not up-to-date either.
257 */
258 const uint64_t STALE = ((uint64_t) 0x1) << 43;
260 /**
261 * A widget that is not unavailable.
262 */
263 const uint64_t ENABLED = ((uint64_t) 0x1) << 44;
265 /**
266 * Same as ENABLED state for now see bug 636158
267 */
268 const uint64_t SENSITIVE = ((uint64_t) 0x1) << 45;
270 /**
271 * The object is expandable, provides a UI to expand/collapse its children
272 * @see EXPANDED and COLLAPSED states.
273 */
274 const uint64_t EXPANDABLE = ((uint64_t) 0x1) << 46;
276 /**
277 * The object is pinned, usually indicating it is fixed in place and has permanence.
278 */
279 const uint64_t PINNED = ((uint64_t) 0x1) << 47;
280 } // namespace states
281 } // namespace a11y
282 } // namespace mozilla
284 #endif