2012-08-28 17:13:59 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_a11y_Filters_h__
|
|
|
|
#define mozilla_a11y_Filters_h__
|
|
|
|
|
2013-07-30 18:25:31 +04:00
|
|
|
#include <stdint.h>
|
2012-08-28 17:13:59 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Predefined filters used for nsAccIterator and nsAccCollector.
|
|
|
|
*/
|
|
|
|
namespace mozilla {
|
|
|
|
namespace a11y {
|
2012-11-18 06:01:44 +04:00
|
|
|
|
2021-02-20 02:14:32 +03:00
|
|
|
class LocalAccessible;
|
2012-11-18 06:01:44 +04:00
|
|
|
|
2012-08-28 17:13:59 +04:00
|
|
|
namespace filters {
|
|
|
|
|
|
|
|
enum EResult { eSkip = 0, eMatch = 1, eSkipSubtree = 2 };
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return true if the traversed accessible complies with filter.
|
|
|
|
*/
|
2021-02-20 02:14:32 +03:00
|
|
|
typedef uint32_t (*FilterFuncPtr)(LocalAccessible*);
|
2012-08-28 17:13:59 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Matches selected/selectable accessibles in subtree.
|
|
|
|
*/
|
2021-02-20 02:14:32 +03:00
|
|
|
uint32_t GetSelected(LocalAccessible* aAccessible);
|
|
|
|
uint32_t GetSelectable(LocalAccessible* aAccessible);
|
2012-08-28 17:13:59 +04:00
|
|
|
} // namespace filters
|
|
|
|
} // namespace a11y
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif
|