|
1 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
4 |
|
5 #ifndef mozilla_a11y_Filters_h__ |
|
6 #define mozilla_a11y_Filters_h__ |
|
7 |
|
8 #include <stdint.h> |
|
9 |
|
10 /** |
|
11 * Predefined filters used for nsAccIterator and nsAccCollector. |
|
12 */ |
|
13 namespace mozilla { |
|
14 namespace a11y { |
|
15 |
|
16 class Accessible; |
|
17 |
|
18 namespace filters { |
|
19 |
|
20 enum EResult { |
|
21 eSkip = 0, |
|
22 eMatch = 1, |
|
23 eSkipSubtree = 2 |
|
24 }; |
|
25 |
|
26 /** |
|
27 * Return true if the traversed accessible complies with filter. |
|
28 */ |
|
29 typedef uint32_t (*FilterFuncPtr) (Accessible*); |
|
30 |
|
31 /** |
|
32 * Matches selected/selectable accessibles in subtree. |
|
33 */ |
|
34 uint32_t GetSelected(Accessible* aAccessible); |
|
35 uint32_t GetSelectable(Accessible* aAccessible); |
|
36 |
|
37 /** |
|
38 * Matches row accessibles in subtree. |
|
39 */ |
|
40 uint32_t GetRow(Accessible* aAccessible); |
|
41 |
|
42 /** |
|
43 * Matches cell accessibles in children. |
|
44 */ |
|
45 uint32_t GetCell(Accessible* aAccessible); |
|
46 |
|
47 /** |
|
48 * Matches embedded objects in children. |
|
49 */ |
|
50 uint32_t GetEmbeddedObject(Accessible* aAccessible); |
|
51 |
|
52 } // namespace filters |
|
53 } // namespace a11y |
|
54 } // namespace mozilla |
|
55 |
|
56 #endif |