1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/accessible/src/base/States.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,285 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* vim: set expandtab shiftwidth=2 tabstop=2: */ 1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#ifndef _states_h_ 1.11 +#define _states_h_ 1.12 + 1.13 +#include <stdint.h> 1.14 + 1.15 +namespace mozilla { 1.16 +namespace a11y { 1.17 +namespace states { 1.18 + 1.19 + /** 1.20 + * The object is disabled, opposite to enabled and sensitive. 1.21 + */ 1.22 + const uint64_t UNAVAILABLE = ((uint64_t) 0x1) << 0; 1.23 + 1.24 + /** 1.25 + * The object is selected. 1.26 + */ 1.27 + const uint64_t SELECTED = ((uint64_t) 0x1) << 1; 1.28 + 1.29 + /** 1.30 + * The object has the keyboard focus. 1.31 + */ 1.32 + const uint64_t FOCUSED = ((uint64_t) 0x1) << 2; 1.33 + 1.34 + /** 1.35 + * The object is pressed. 1.36 + */ 1.37 + const uint64_t PRESSED = ((uint64_t) 0x1) << 3; 1.38 + 1.39 + /** 1.40 + * The checkable object is checked, applied to check box controls, 1.41 + * @see CHECKABLE and MIXED states. 1.42 + */ 1.43 + const uint64_t CHECKED = ((uint64_t) 0x1) << 4; 1.44 + 1.45 + /** 1.46 + * Indicates that the state of a three-state check box or tool bar button is 1.47 + * undetermined. The check box is neither checked or unchecked, and is 1.48 + * in the third or mixed state. 1.49 + */ 1.50 + const uint64_t MIXED = ((uint64_t) 0x1) << 5; 1.51 + 1.52 + /** 1.53 + * The object is designated read-only, so it can't be edited. 1.54 + */ 1.55 + const uint64_t READONLY = ((uint64_t) 0x1) << 6; 1.56 + 1.57 + /** 1.58 + * The object is hot-tracked by the mouse, which means that its appearance 1.59 + * has changed to indicate that the mouse pointer is located over it. 1.60 + * 1.61 + * This is currently unused. 1.62 + */ 1.63 + const uint64_t HOTTRACKED = ((uint64_t) 0x1) << 7; 1.64 + 1.65 + /** 1.66 + * This object is the default button in a window. 1.67 + */ 1.68 + const uint64_t DEFAULT = ((uint64_t) 0x1) << 8; 1.69 + 1.70 + /** 1.71 + * The expandable object's children are displayed, the opposite of collapsed, 1.72 + * applied to trees, list and other controls. 1.73 + * @see COLLAPSED state 1.74 + */ 1.75 + const uint64_t EXPANDED = ((uint64_t) 0x1) << 9; 1.76 + 1.77 + /** 1.78 + * The expandable object's children are not displayed, the opposite of 1.79 + * expanded, applied to tree lists and other controls, 1.80 + * @see EXPANDED state. 1.81 + */ 1.82 + const uint64_t COLLAPSED = ((uint64_t) 0x1) << 10; 1.83 + 1.84 + /** 1.85 + * The control or document can not accept input at this time. 1.86 + */ 1.87 + const uint64_t BUSY = ((uint64_t) 0x1) << 11; 1.88 + 1.89 + /** 1.90 + * The object is out of normal flow, may be outside of boundaries of its 1.91 + * parent. 1.92 + */ 1.93 + const uint64_t FLOATING = ((uint64_t) 0x1) << 12; 1.94 + 1.95 + /** 1.96 + * The object can be checked. 1.97 + */ 1.98 + const uint64_t CHECKABLE = ((uint64_t) 0x1) << 13; 1.99 + 1.100 + /** 1.101 + * This object is a graphic which is rapidly changing appearance. 1.102 + */ 1.103 + const uint64_t ANIMATED = ((uint64_t) 0x1) << 14; 1.104 + 1.105 + /** 1.106 + * The object is programmatically hidden. 1.107 + * So user action like scrolling or switching tabs won't make this visible. 1.108 + */ 1.109 + const uint64_t INVISIBLE = ((uint64_t) 0x1) << 15; 1.110 + 1.111 + /** 1.112 + * The object is scrolled off screen. 1.113 + * User action such as scrolling or changing tab may make the object 1.114 + * visible. 1.115 + */ 1.116 + const uint64_t OFFSCREEN = ((uint64_t) 0x1) << 16; 1.117 + 1.118 + /** 1.119 + * The object can be resized. 1.120 + */ 1.121 + const uint64_t SIZEABLE = ((uint64_t) 0x1) << 17; 1.122 + 1.123 + /** 1.124 + * The object can be moved to a different position. 1.125 + */ 1.126 + const uint64_t MOVEABLE = ((uint64_t) 0x1) << 18; 1.127 + 1.128 + /** 1.129 + * The object describes itself with speech. 1.130 + * Other speech related assistive technology may want to avoid speaking 1.131 + * information about this object, because the object is already doing this. 1.132 + */ 1.133 + const uint64_t SELFVOICING = ((uint64_t) 0x1) << 19; 1.134 + 1.135 + /** 1.136 + * The object can have the focus and become focused. 1.137 + */ 1.138 + const uint64_t FOCUSABLE = ((uint64_t) 0x1) << 20; 1.139 + 1.140 + /** 1.141 + * The object can be selected. 1.142 + */ 1.143 + const uint64_t SELECTABLE = ((uint64_t) 0x1) << 21; 1.144 + 1.145 + /** 1.146 + * This object is a link. 1.147 + */ 1.148 + const uint64_t LINKED = ((uint64_t) 0x1) << 22; 1.149 + 1.150 + /** 1.151 + * This is used for links that have been traversed 1.152 + * i.e. the linked page has been visited. 1.153 + */ 1.154 + const uint64_t TRAVERSED = ((uint64_t) 0x1) << 23; 1.155 + 1.156 + /** 1.157 + * Supports multiple selection. 1.158 + */ 1.159 + const uint64_t MULTISELECTABLE = ((uint64_t) 0x1) << 24; 1.160 + 1.161 + /** 1.162 + * Supports extended selection. 1.163 + * All objects supporting this are also multipselectable. 1.164 + * This only makes sense for msaa see bug 635690. 1.165 + */ 1.166 + const uint64_t EXTSELECTABLE = ((uint64_t) 0x1) << 25; 1.167 + 1.168 + /** 1.169 + * The user is required to interact with this object. 1.170 + */ 1.171 + const uint64_t REQUIRED = ((uint64_t) 0x1) << 26; 1.172 + 1.173 + /** 1.174 + * The object is an alert, notifying the user of something important. 1.175 + */ 1.176 + const uint64_t ALERT = ((uint64_t) 0x1) << 27; 1.177 + 1.178 + /** 1.179 + * Used for text fields containing invalid values. 1.180 + */ 1.181 + const uint64_t INVALID = ((uint64_t) 0x1) << 28; 1.182 + 1.183 + /** 1.184 + * The controls value can not be obtained, and is returned as a set of "*"s. 1.185 + */ 1.186 + const uint64_t PROTECTED = ((uint64_t) 0x1) << 29; 1.187 + 1.188 + /** 1.189 + * The object can be invoked to show a pop up menu or window. 1.190 + */ 1.191 + const uint64_t HASPOPUP = ((uint64_t) 0x1) << 30; 1.192 + 1.193 + /** 1.194 + * The editable area has some kind of autocompletion. 1.195 + */ 1.196 + const uint64_t SUPPORTS_AUTOCOMPLETION = ((uint64_t) 0x1) << 31; 1.197 + 1.198 + /** 1.199 + * The object is no longer available to be queried. 1.200 + */ 1.201 + const uint64_t DEFUNCT = ((uint64_t) 0x1) << 32; 1.202 + 1.203 + /** 1.204 + * The text is selectable, the object must implement the text interface. 1.205 + */ 1.206 + const uint64_t SELECTABLE_TEXT = ((uint64_t) 0x1) << 33; 1.207 + 1.208 + /** 1.209 + * The text in this object can be edited. 1.210 + */ 1.211 + const uint64_t EDITABLE = ((uint64_t) 0x1) << 34; 1.212 + 1.213 + /** 1.214 + * This window is currently the active window. 1.215 + */ 1.216 + const uint64_t ACTIVE = ((uint64_t) 0x1) << 35; 1.217 + 1.218 + /** 1.219 + * Indicates that the object is modal. Modal objects have the behavior 1.220 + * that something must be done with the object before the user can 1.221 + * interact with an object in a different window. 1.222 + */ 1.223 + const uint64_t MODAL = ((uint64_t) 0x1) << 36; 1.224 + 1.225 + /** 1.226 + * Edit control that can take multiple lines. 1.227 + */ 1.228 + const uint64_t MULTI_LINE = ((uint64_t) 0x1) << 37; 1.229 + 1.230 + /** 1.231 + * Uses horizontal layout. 1.232 + */ 1.233 + const uint64_t HORIZONTAL = ((uint64_t) 0x1) << 38; 1.234 + 1.235 + /** 1.236 + * Indicates this object paints every pixel within its rectangular region. 1.237 + */ 1.238 + const uint64_t OPAQUE1 = ((uint64_t) 0x1) << 39; 1.239 + 1.240 + /** 1.241 + * This text object can only contain 1 line of text. 1.242 + */ 1.243 + const uint64_t SINGLE_LINE = ((uint64_t) 0x1) << 40; 1.244 + 1.245 + /** 1.246 + * The parent object manages descendants, and this object may only exist 1.247 + * while it is visible or has focus. 1.248 + * For example the focused cell of a table or the current element of a list box may have this state. 1.249 + */ 1.250 + const uint64_t TRANSIENT = ((uint64_t) 0x1) << 41; 1.251 + 1.252 + /** 1.253 + * Uses vertical layout. 1.254 + * Especially used for sliders and scrollbars. 1.255 + */ 1.256 + const uint64_t VERTICAL = ((uint64_t) 0x1) << 42; 1.257 + 1.258 + /** 1.259 + * Object not dead, but not up-to-date either. 1.260 + */ 1.261 + const uint64_t STALE = ((uint64_t) 0x1) << 43; 1.262 + 1.263 + /** 1.264 + * A widget that is not unavailable. 1.265 + */ 1.266 + const uint64_t ENABLED = ((uint64_t) 0x1) << 44; 1.267 + 1.268 + /** 1.269 + * Same as ENABLED state for now see bug 636158 1.270 + */ 1.271 + const uint64_t SENSITIVE = ((uint64_t) 0x1) << 45; 1.272 + 1.273 + /** 1.274 + * The object is expandable, provides a UI to expand/collapse its children 1.275 + * @see EXPANDED and COLLAPSED states. 1.276 + */ 1.277 + const uint64_t EXPANDABLE = ((uint64_t) 0x1) << 46; 1.278 + 1.279 + /** 1.280 + * The object is pinned, usually indicating it is fixed in place and has permanence. 1.281 + */ 1.282 + const uint64_t PINNED = ((uint64_t) 0x1) << 47; 1.283 +} // namespace states 1.284 +} // namespace a11y 1.285 +} // namespace mozilla 1.286 + 1.287 +#endif 1.288 +