accessible/src/base/States.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial