OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_BASE_ACCESSIBILITY_ACCESSIBILITY_TYPES_H_ | 5 #ifndef UI_BASE_ACCESSIBILITY_ACCESSIBILITY_TYPES_H_ |
6 #define UI_BASE_ACCESSIBILITY_ACCESSIBILITY_TYPES_H_ | 6 #define UI_BASE_ACCESSIBILITY_ACCESSIBILITY_TYPES_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 | 10 |
11 namespace ui { | 11 namespace ui { |
12 | 12 |
13 //////////////////////////////////////////////////////////////////////////////// | 13 //////////////////////////////////////////////////////////////////////////////// |
14 // | 14 // |
15 // AccessibilityTypes | 15 // AccessibilityTypes |
16 // | 16 // |
17 // Provides enumerations used to preserve platform-independence in | 17 // Provides enumerations used to preserve platform-independence in |
18 // accessibility functions. | 18 // accessibility functions. |
19 // | 19 // |
20 //////////////////////////////////////////////////////////////////////////////// | 20 //////////////////////////////////////////////////////////////////////////////// |
21 class AccessibilityTypes { | 21 class AccessibilityTypes { |
22 public: | 22 public: |
23 | 23 |
24 // This defines states of the supported accessibility roles in our | 24 // This defines states of the supported accessibility roles in our |
25 // Views (e.g. used in View::GetAccessibleState). Any interface using roles | 25 // Views (e.g. used in View::GetAccessibleState). Any interface using states |
26 // must provide a conversion to its own roles (see e.g. | 26 // must provide a conversion to its own states (see e.g. |
27 // ViewAccessibility::get_accState and ViewAccessibility::MSAAState). | 27 // NativeViewAccessibilityWin::get_accState). |
28 typedef uint32 State; | 28 typedef uint32 State; |
29 enum StateFlag { | 29 enum StateFlag { |
30 STATE_CHECKED = 1 << 0, | 30 STATE_CHECKED = 1 << 0, |
31 STATE_COLLAPSED = 1 << 1, | 31 STATE_COLLAPSED = 1 << 1, |
32 STATE_DEFAULT = 1 << 2, | 32 STATE_DEFAULT = 1 << 2, |
33 STATE_EXPANDED = 1 << 3, | 33 STATE_EDITABLE = 1 << 3, |
34 STATE_HASPOPUP = 1 << 4, | 34 STATE_EXPANDED = 1 << 4, |
35 STATE_HOTTRACKED = 1 << 5, | 35 STATE_HASPOPUP = 1 << 5, |
36 STATE_INVISIBLE = 1 << 6, | 36 STATE_HOTTRACKED = 1 << 6, |
37 STATE_LINKED = 1 << 7, | 37 STATE_INVISIBLE = 1 << 7, |
38 STATE_OFFSCREEN = 1 << 8, | 38 STATE_LINKED = 1 << 8, |
39 STATE_PRESSED = 1 << 9, | 39 STATE_OFFSCREEN = 1 << 9, |
40 STATE_PROTECTED = 1 << 10, | 40 STATE_PRESSED = 1 << 10, |
41 STATE_READONLY = 1 << 11, | 41 STATE_PROTECTED = 1 << 11, |
42 STATE_SELECTED = 1 << 12, | 42 STATE_READONLY = 1 << 12, |
43 STATE_FOCUSED = 1 << 13, | 43 STATE_SELECTED = 1 << 13, |
44 STATE_UNAVAILABLE = 1 << 14 | 44 STATE_FOCUSED = 1 << 14, |
David Tseng
2011/10/25 21:55:25
nit: Alphabetize now?
| |
45 STATE_UNAVAILABLE = 1 << 15 | |
45 }; | 46 }; |
46 | 47 |
47 // This defines an enumeration of the supported accessibility roles in our | 48 // This defines an enumeration of the supported accessibility roles in our |
48 // Views (e.g. used in View::GetAccessibleRole). Any interface using roles | 49 // Views (e.g. used in View::GetAccessibleRole). Any interface using roles |
49 // must provide a conversion to its own roles (see e.g. | 50 // must provide a conversion to its own roles (see e.g. |
50 // ViewAccessibility::get_accRole and ViewAccessibility::MSAARole). | 51 // NativeViewAccessibilityWin::get_accRole). |
51 enum Role { | 52 enum Role { |
52 ROLE_ALERT, | 53 ROLE_ALERT, |
53 ROLE_APPLICATION, | 54 ROLE_APPLICATION, |
54 ROLE_BUTTONDROPDOWN, | 55 ROLE_BUTTONDROPDOWN, |
55 ROLE_BUTTONMENU, | 56 ROLE_BUTTONMENU, |
56 ROLE_CHECKBUTTON, | 57 ROLE_CHECKBUTTON, |
57 ROLE_CLIENT, | 58 ROLE_CLIENT, |
58 ROLE_COMBOBOX, | 59 ROLE_COMBOBOX, |
59 ROLE_DIALOG, | 60 ROLE_DIALOG, |
60 ROLE_GRAPHIC, | 61 ROLE_GRAPHIC, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
100 | 101 |
101 private: | 102 private: |
102 // Do not instantiate this class. | 103 // Do not instantiate this class. |
103 AccessibilityTypes() {} | 104 AccessibilityTypes() {} |
104 ~AccessibilityTypes() {} | 105 ~AccessibilityTypes() {} |
105 }; | 106 }; |
106 | 107 |
107 } // namespace ui | 108 } // namespace ui |
108 | 109 |
109 #endif // UI_BASE_ACCESSIBILITY_ACCESSIBILITY_TYPES_H_ | 110 #endif // UI_BASE_ACCESSIBILITY_ACCESSIBILITY_TYPES_H_ |
OLD | NEW |