Bug 1788251 [wpt PR 35638] - Prerender2: allow referrer policy mismatches, a=testonly
[gecko.git] / accessible / base / Filters.h
blob0fbd3cb5cbc0b4d23890e4c417f74fb5d7962d09
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/. */
5 #ifndef mozilla_a11y_Filters_h__
6 #define mozilla_a11y_Filters_h__
8 #include <stdint.h>
10 /**
11 * Predefined filters used for nsAccIterator and nsAccCollector.
13 namespace mozilla {
14 namespace a11y {
16 class LocalAccessible;
18 namespace filters {
20 enum EResult { eSkip = 0, eMatch = 1, eSkipSubtree = 2 };
22 /**
23 * Return true if the traversed accessible complies with filter.
25 typedef uint32_t (*FilterFuncPtr)(LocalAccessible*);
27 /**
28 * Matches selected/selectable accessibles in subtree.
30 uint32_t GetSelected(LocalAccessible* aAccessible);
31 uint32_t GetSelectable(LocalAccessible* aAccessible);
33 /**
34 * Matches row accessibles in subtree.
36 uint32_t GetRow(LocalAccessible* aAccessible);
38 /**
39 * Matches cell accessibles in children.
41 uint32_t GetCell(LocalAccessible* aAccessible);
42 } // namespace filters
43 } // namespace a11y
44 } // namespace mozilla
46 #endif