michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_a11y_Filters_h__ michael@0: #define mozilla_a11y_Filters_h__ michael@0: michael@0: #include michael@0: michael@0: /** michael@0: * Predefined filters used for nsAccIterator and nsAccCollector. michael@0: */ michael@0: namespace mozilla { michael@0: namespace a11y { michael@0: michael@0: class Accessible; michael@0: michael@0: namespace filters { michael@0: michael@0: enum EResult { michael@0: eSkip = 0, michael@0: eMatch = 1, michael@0: eSkipSubtree = 2 michael@0: }; michael@0: michael@0: /** michael@0: * Return true if the traversed accessible complies with filter. michael@0: */ michael@0: typedef uint32_t (*FilterFuncPtr) (Accessible*); michael@0: michael@0: /** michael@0: * Matches selected/selectable accessibles in subtree. michael@0: */ michael@0: uint32_t GetSelected(Accessible* aAccessible); michael@0: uint32_t GetSelectable(Accessible* aAccessible); michael@0: michael@0: /** michael@0: * Matches row accessibles in subtree. michael@0: */ michael@0: uint32_t GetRow(Accessible* aAccessible); michael@0: michael@0: /** michael@0: * Matches cell accessibles in children. michael@0: */ michael@0: uint32_t GetCell(Accessible* aAccessible); michael@0: michael@0: /** michael@0: * Matches embedded objects in children. michael@0: */ michael@0: uint32_t GetEmbeddedObject(Accessible* aAccessible); michael@0: michael@0: } // namespace filters michael@0: } // namespace a11y michael@0: } // namespace mozilla michael@0: michael@0: #endif