accessible/src/base/Filters.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/src/base/Filters.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,56 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#ifndef mozilla_a11y_Filters_h__
     1.9 +#define mozilla_a11y_Filters_h__
    1.10 +
    1.11 +#include <stdint.h>
    1.12 +
    1.13 +/**
    1.14 + * Predefined filters used for nsAccIterator and nsAccCollector.
    1.15 + */
    1.16 +namespace mozilla {
    1.17 +namespace a11y {
    1.18 +
    1.19 +class Accessible;
    1.20 +
    1.21 +namespace filters {
    1.22 +
    1.23 +enum EResult {
    1.24 +  eSkip = 0,
    1.25 +  eMatch = 1,
    1.26 +  eSkipSubtree = 2
    1.27 +};
    1.28 +
    1.29 +/**
    1.30 + * Return true if the traversed accessible complies with filter.
    1.31 + */
    1.32 +typedef uint32_t (*FilterFuncPtr) (Accessible*);
    1.33 +
    1.34 +/**
    1.35 + * Matches selected/selectable accessibles in subtree.
    1.36 + */
    1.37 +uint32_t GetSelected(Accessible* aAccessible);
    1.38 +uint32_t GetSelectable(Accessible* aAccessible);
    1.39 +
    1.40 +/**
    1.41 + * Matches row accessibles in subtree.
    1.42 + */
    1.43 +uint32_t GetRow(Accessible* aAccessible);
    1.44 +
    1.45 +/**
    1.46 + * Matches cell accessibles in children.
    1.47 + */
    1.48 +uint32_t GetCell(Accessible* aAccessible);
    1.49 +
    1.50 +/**
    1.51 + * Matches embedded objects in children.
    1.52 + */
    1.53 +uint32_t GetEmbeddedObject(Accessible* aAccessible);
    1.54 +
    1.55 +} // namespace filters
    1.56 +} // namespace a11y
    1.57 +} // namespace mozilla
    1.58 +
    1.59 +#endif

mercurial