michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim: set ts=2 et sw=2 tw=80: */ 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 file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef _mozilla_a11y_aria_ARIAStateMap_h_ michael@0: #define _mozilla_a11y_aria_ARIAStateMap_h_ michael@0: michael@0: #include michael@0: michael@0: namespace mozilla { michael@0: michael@0: namespace dom { michael@0: class Element; michael@0: } michael@0: michael@0: namespace a11y { michael@0: namespace aria { michael@0: michael@0: /** michael@0: * List of the ARIA state mapping rules. michael@0: */ michael@0: enum EStateRule michael@0: { michael@0: eARIANone, michael@0: eARIAAutoComplete, michael@0: eARIABusy, michael@0: eARIACheckableBool, michael@0: eARIACheckableMixed, michael@0: eARIACheckedMixed, michael@0: eARIADisabled, michael@0: eARIAExpanded, michael@0: eARIAHasPopup, michael@0: eARIAInvalid, michael@0: eARIAMultiline, michael@0: eARIAMultiSelectable, michael@0: eARIAOrientation, michael@0: eARIAPressed, michael@0: eARIAReadonly, michael@0: eARIAReadonlyOrEditable, michael@0: eARIAReadonlyOrEditableIfDefined, michael@0: eARIARequired, michael@0: eARIASelectable, michael@0: eARIASelectableIfDefined, michael@0: eReadonlyUntilEditable, michael@0: eIndeterminateIfNoValue, michael@0: eFocusableUntilDisabled michael@0: }; michael@0: michael@0: /** michael@0: * Expose the accessible states for the given element accordingly to state michael@0: * mapping rule. michael@0: * michael@0: * @param aRule [in] state mapping rule ID michael@0: * @param aElement [in] node of the accessible michael@0: * @param aState [in/out] accessible states michael@0: * @return true if state map rule ID is valid michael@0: */ michael@0: bool MapToState(EStateRule aRule, dom::Element* aElement, uint64_t* aState); michael@0: michael@0: } // namespace aria michael@0: } // namespace a11y michael@0: } // namespace mozilla michael@0: michael@0: #endif