Bug 1787269 [wpt PR 35624] - Further refine STP download regexs, a=testonly
[gecko.git] / accessible / xpcom / xpcAccessible.h
bloba8475020dab8ecafc50e37feccedecb2af05bb1f
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_a11y_xpcAccessible_h_
8 #define mozilla_a11y_xpcAccessible_h_
10 #include "nsIAccessible.h"
12 class nsIAccessible;
14 namespace mozilla {
15 namespace a11y {
17 class Accessible;
18 class LocalAccessible;
20 /**
21 * XPCOM nsIAccessible interface implementation, used by xpcAccessibleGeneric
22 * class.
24 class xpcAccessible : public nsIAccessible {
25 public:
26 // nsIAccessible
27 NS_IMETHOD GetParent(nsIAccessible** aParent) final;
28 NS_IMETHOD GetNextSibling(nsIAccessible** aNextSibling) final;
29 NS_IMETHOD GetPreviousSibling(nsIAccessible** aPreviousSibling) final;
30 NS_IMETHOD GetFirstChild(nsIAccessible** aFirstChild) final;
31 NS_IMETHOD GetLastChild(nsIAccessible** aLastChild) final;
32 NS_IMETHOD GetChildCount(int32_t* aChildCount) final;
33 NS_IMETHOD GetChildAt(int32_t aChildIndex, nsIAccessible** aChild) final;
34 NS_IMETHOD GetChildren(nsIArray** aChildren) final;
35 NS_IMETHOD GetIndexInParent(int32_t* aIndexInParent) final;
37 NS_IMETHOD GetUniqueID(int64_t* aUniqueID) final;
38 NS_IMETHOD GetDOMNode(nsINode** aDOMNode) final;
39 NS_IMETHOD GetId(nsAString& aID) final;
40 NS_IMETHOD GetDocument(nsIAccessibleDocument** aDocument) final;
41 NS_IMETHOD GetRootDocument(nsIAccessibleDocument** aRootDocument) final;
43 NS_IMETHOD GetRole(uint32_t* aRole) final;
44 NS_IMETHOD GetState(uint32_t* aState, uint32_t* aExtraState) final;
46 NS_IMETHOD GetDescription(nsAString& aDescription) final;
47 NS_IMETHOD GetName(nsAString& aName) final;
48 NS_IMETHOD GetLanguage(nsAString& aLanguage) final;
49 NS_IMETHOD GetValue(nsAString& aValue) final;
50 NS_IMETHOD GetHelp(nsAString& aHelp) final;
52 NS_IMETHOD GetAccessKey(nsAString& aAccessKey) final;
53 NS_IMETHOD GetKeyboardShortcut(nsAString& aKeyBinding) final;
55 NS_IMETHOD GetAttributes(nsIPersistentProperties** aAttributes) final;
57 NS_IMETHOD GetCache(nsIPersistentProperties** aCachedFields) final;
59 NS_IMETHOD GetNativeInterface(nsISupports** aNativeInterface) final;
61 NS_IMETHOD GetBounds(int32_t* aX, int32_t* aY, int32_t* aWidth,
62 int32_t* aHeight) final;
63 NS_IMETHOD GetBoundsInCSSPixels(int32_t* aX, int32_t* aY, int32_t* aWidth,
64 int32_t* aHeight) final;
65 NS_IMETHOD GroupPosition(int32_t* aGroupLevel, int32_t* aSimilarItemsInGroup,
66 int32_t* aPositionInGroup) final;
67 NS_IMETHOD GetRelationByType(uint32_t aType,
68 nsIAccessibleRelation** aRelation) final;
69 NS_IMETHOD GetRelations(nsIArray** aRelations) final;
71 NS_IMETHOD GetFocusedChild(nsIAccessible** aChild) final;
72 NS_IMETHOD GetChildAtPoint(int32_t aX, int32_t aY,
73 nsIAccessible** aAccessible) final;
74 NS_IMETHOD GetDeepestChildAtPoint(int32_t aX, int32_t aY,
75 nsIAccessible** aAccessible) final;
76 NS_IMETHOD GetDeepestChildAtPointInProcess(int32_t aX, int32_t aY,
77 nsIAccessible** aAccessible) final;
79 NS_IMETHOD SetSelected(bool aSelect) final;
80 NS_IMETHOD TakeSelection() final;
81 NS_IMETHOD TakeFocus() final;
83 NS_IMETHOD GetActionCount(uint8_t* aActionCount) final;
84 NS_IMETHOD GetActionName(uint8_t aIndex, nsAString& aName) final;
85 NS_IMETHOD GetActionDescription(uint8_t aIndex,
86 nsAString& aDescription) final;
87 NS_IMETHOD DoAction(uint8_t aIndex) final;
89 MOZ_CAN_RUN_SCRIPT
90 NS_IMETHOD ScrollTo(uint32_t aHow) final;
91 NS_IMETHOD ScrollToPoint(uint32_t aCoordinateType, int32_t aX,
92 int32_t aY) final;
94 NS_IMETHOD Announce(const nsAString& aAnnouncement, uint16_t aPriority) final;
96 protected:
97 xpcAccessible() {}
98 virtual ~xpcAccessible() {}
100 private:
101 LocalAccessible* Intl();
102 Accessible* IntlGeneric();
104 xpcAccessible(const xpcAccessible&) = delete;
105 xpcAccessible& operator=(const xpcAccessible&) = delete;
108 } // namespace a11y
109 } // namespace mozilla
111 #endif