States.h (7637B)
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/. */ 6 7 #ifndef _states_h_ 8 #define _states_h_ 9 10 #include <stdint.h> 11 12 namespace mozilla { 13 namespace a11y { 14 namespace states { 15 16 /** 17 * The object is disabled, opposite to enabled and sensitive. 18 */ 19 const uint64_t UNAVAILABLE = ((uint64_t)0x1) << 0; 20 21 /** 22 * The object is selected. 23 */ 24 const uint64_t SELECTED = ((uint64_t)0x1) << 1; 25 26 /** 27 * The object has the keyboard focus. 28 */ 29 const uint64_t FOCUSED = ((uint64_t)0x1) << 2; 30 31 /** 32 * The object is pressed. 33 */ 34 const uint64_t PRESSED = ((uint64_t)0x1) << 3; 35 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; 41 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; 48 49 /** 50 * The object is designated read-only, so it can't be edited. 51 */ 52 const uint64_t READONLY = ((uint64_t)0x1) << 6; 53 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; 61 62 /** 63 * This object is the default button in a window. 64 */ 65 const uint64_t DEFAULT = ((uint64_t)0x1) << 8; 66 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; 73 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; 80 81 /** 82 * The control or document can not accept input at this time. 83 */ 84 const uint64_t BUSY = ((uint64_t)0x1) << 11; 85 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; 91 92 /** 93 * The object can be checked. 94 */ 95 const uint64_t CHECKABLE = ((uint64_t)0x1) << 13; 96 97 /** 98 * This object is a graphic which is rapidly changing appearance. 99 */ 100 const uint64_t ANIMATED = ((uint64_t)0x1) << 14; 101 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; 107 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; 114 115 /** 116 * The object can be resized. 117 */ 118 const uint64_t SIZEABLE = ((uint64_t)0x1) << 17; 119 120 /** 121 * The object can be moved to a different position. 122 */ 123 const uint64_t MOVEABLE = ((uint64_t)0x1) << 18; 124 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; 131 132 /** 133 * The object can have the focus and become focused. 134 */ 135 const uint64_t FOCUSABLE = ((uint64_t)0x1) << 20; 136 137 /** 138 * The object can be selected. 139 */ 140 const uint64_t SELECTABLE = ((uint64_t)0x1) << 21; 141 142 /** 143 * This object is a link. 144 */ 145 const uint64_t LINKED = ((uint64_t)0x1) << 22; 146 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; 152 153 /** 154 * Supports multiple selection. 155 */ 156 const uint64_t MULTISELECTABLE = ((uint64_t)0x1) << 24; 157 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; 164 165 /** 166 * The user is required to interact with this object. 167 */ 168 const uint64_t REQUIRED = ((uint64_t)0x1) << 26; 169 170 /** 171 * The object is an alert, notifying the user of something important. 172 */ 173 const uint64_t ALERT = ((uint64_t)0x1) << 27; 174 175 /** 176 * Used for text fields containing invalid values. 177 */ 178 const uint64_t INVALID = ((uint64_t)0x1) << 28; 179 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; 184 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; 189 190 /** 191 * The editable area has some kind of autocompletion. 192 */ 193 const uint64_t SUPPORTS_AUTOCOMPLETION = ((uint64_t)0x1) << 31; 194 195 /** 196 * The object is no longer available to be queried. 197 */ 198 const uint64_t DEFUNCT = ((uint64_t)0x1) << 32; 199 200 /** 201 * The text is selectable, the object must implement the text interface. 202 */ 203 const uint64_t SELECTABLE_TEXT = ((uint64_t)0x1) << 33; 204 205 /** 206 * The text in this object can be edited. 207 */ 208 const uint64_t EDITABLE = ((uint64_t)0x1) << 34; 209 210 /** 211 * This window is currently the active window. 212 */ 213 const uint64_t ACTIVE = ((uint64_t)0x1) << 35; 214 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; 221 222 /** 223 * Edit control that can take multiple lines. 224 */ 225 const uint64_t MULTI_LINE = ((uint64_t)0x1) << 37; 226 227 /** 228 * Uses horizontal layout. 229 */ 230 const uint64_t HORIZONTAL = ((uint64_t)0x1) << 38; 231 232 /** 233 * Indicates this object paints every pixel within its rectangular region. 234 */ 235 const uint64_t OPAQUE1 = ((uint64_t)0x1) << 39; 236 237 /** 238 * This text object can only contain 1 line of text. 239 */ 240 const uint64_t SINGLE_LINE = ((uint64_t)0x1) << 40; 241 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 246 * may have this state. 247 */ 248 const uint64_t TRANSIENT = ((uint64_t)0x1) << 41; 249 250 /** 251 * Uses vertical layout. 252 * Especially used for sliders and scrollbars. 253 */ 254 const uint64_t VERTICAL = ((uint64_t)0x1) << 42; 255 256 /** 257 * Object not dead, but not up-to-date either. 258 */ 259 const uint64_t STALE = ((uint64_t)0x1) << 43; 260 261 /** 262 * A widget that is not unavailable. 263 */ 264 const uint64_t ENABLED = ((uint64_t)0x1) << 44; 265 266 /** 267 * Same as ENABLED state for now see bug 636158 268 */ 269 const uint64_t SENSITIVE = ((uint64_t)0x1) << 45; 270 271 /** 272 * The object is expandable, provides a UI to expand/collapse its children 273 * @see EXPANDED and COLLAPSED states. 274 */ 275 const uint64_t EXPANDABLE = ((uint64_t)0x1) << 46; 276 277 /** 278 * The object is pinned, usually indicating it is fixed in place and has 279 * permanence. 280 */ 281 const uint64_t PINNED = ((uint64_t)0x1) << 47; 282 283 /** 284 * The object is the current item within a container or set of related elements. 285 */ 286 const uint64_t CURRENT = ((uint64_t)0x1) << 48; 287 288 /** 289 * Not a real state, used for static assertions. 290 */ 291 const uint64_t LAST_ENTRY = CURRENT; 292 293 } // namespace states 294 295 /** 296 * States that must be calculated by RemoteAccessible and are thus not cached. 297 */ 298 const uint64_t kRemoteCalculatedStates = states::FOCUSED | states::INVISIBLE | 299 states::OFFSCREEN | states::SENSITIVE | 300 states::COLLAPSED | states::OPAQUE1; 301 302 } // namespace a11y 303 } // namespace mozilla 304 305 #endif