/src/mozilla-central/accessible/xpcom/xpcAccessible.h
Line | Count | Source (jump to first uncovered line) |
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/. */ |
6 | | |
7 | | #ifndef mozilla_a11y_xpcAccessible_h_ |
8 | | #define mozilla_a11y_xpcAccessible_h_ |
9 | | |
10 | | #include "nsIAccessible.h" |
11 | | |
12 | | class nsIAccessible; |
13 | | |
14 | | namespace mozilla { |
15 | | namespace a11y { |
16 | | |
17 | | class Accessible; |
18 | | class AccessibleOrProxy; |
19 | | |
20 | | /** |
21 | | * XPCOM nsIAccessible interface implementation, used by xpcAccessibleGeneric |
22 | | * class. |
23 | | */ |
24 | | class xpcAccessible : public nsIAccessible |
25 | | { |
26 | | public: |
27 | | // nsIAccessible |
28 | | NS_IMETHOD GetParent(nsIAccessible** aParent) final; |
29 | | NS_IMETHOD GetNextSibling(nsIAccessible** aNextSibling) final; |
30 | | NS_IMETHOD GetPreviousSibling(nsIAccessible** aPreviousSibling) |
31 | | final; |
32 | | NS_IMETHOD GetFirstChild(nsIAccessible** aFirstChild) final; |
33 | | NS_IMETHOD GetLastChild(nsIAccessible** aLastChild) final; |
34 | | NS_IMETHOD GetChildCount(int32_t* aChildCount) final; |
35 | | NS_IMETHOD GetChildAt(int32_t aChildIndex, nsIAccessible** aChild) |
36 | | final; |
37 | | NS_IMETHOD GetChildren(nsIArray** aChildren) final; |
38 | | NS_IMETHOD GetIndexInParent(int32_t* aIndexInParent) final; |
39 | | |
40 | | NS_IMETHOD GetDOMNode(nsINode** aDOMNode) final; |
41 | | NS_IMETHOD GetId(nsAString& aID) final; |
42 | | NS_IMETHOD GetDocument(nsIAccessibleDocument** aDocument) final; |
43 | | NS_IMETHOD GetRootDocument(nsIAccessibleDocument** aRootDocument) |
44 | | final; |
45 | | |
46 | | NS_IMETHOD GetRole(uint32_t* aRole) final; |
47 | | NS_IMETHOD GetState(uint32_t* aState, uint32_t* aExtraState) |
48 | | final; |
49 | | |
50 | | NS_IMETHOD GetDescription(nsAString& aDescription) final; |
51 | | NS_IMETHOD GetName(nsAString& aName) final; |
52 | | NS_IMETHOD GetLanguage(nsAString& aLanguage) final; |
53 | | NS_IMETHOD GetValue(nsAString& aValue) final; |
54 | | NS_IMETHOD GetHelp(nsAString& aHelp) final; |
55 | | |
56 | | NS_IMETHOD GetAccessKey(nsAString& aAccessKey) final; |
57 | | NS_IMETHOD GetKeyboardShortcut(nsAString& aKeyBinding) final; |
58 | | |
59 | | NS_IMETHOD GetAttributes(nsIPersistentProperties** aAttributes) |
60 | | final; |
61 | | NS_IMETHOD GetBounds(int32_t* aX, int32_t* aY, |
62 | | int32_t* aWidth, int32_t* aHeight) final; |
63 | | NS_IMETHOD GetBoundsInCSSPixels(int32_t* aX, int32_t* aY, |
64 | | int32_t* aWidth, 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) |
69 | | final; |
70 | | NS_IMETHOD GetRelations(nsIArray** aRelations) final; |
71 | | |
72 | | NS_IMETHOD GetFocusedChild(nsIAccessible** aChild) final; |
73 | | NS_IMETHOD GetChildAtPoint(int32_t aX, int32_t aY, |
74 | | nsIAccessible** aAccessible) final; |
75 | | NS_IMETHOD GetDeepestChildAtPoint(int32_t aX, int32_t aY, |
76 | | nsIAccessible** aAccessible) |
77 | | final; |
78 | | |
79 | | NS_IMETHOD SetSelected(bool aSelect) final; |
80 | | NS_IMETHOD TakeSelection() final; |
81 | | NS_IMETHOD TakeFocus() final; |
82 | | |
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, nsAString& aDescription) |
86 | | final; |
87 | | NS_IMETHOD DoAction(uint8_t aIndex) final; |
88 | | |
89 | | NS_IMETHOD ScrollTo(uint32_t aHow) final; |
90 | | NS_IMETHOD ScrollToPoint(uint32_t aCoordinateType, |
91 | | int32_t aX, int32_t aY) final; |
92 | | |
93 | | protected: |
94 | 0 | xpcAccessible() { } |
95 | 0 | virtual ~xpcAccessible() {} |
96 | | |
97 | | private: |
98 | | Accessible* Intl(); |
99 | | AccessibleOrProxy IntlGeneric(); |
100 | | |
101 | | xpcAccessible(const xpcAccessible&) = delete; |
102 | | xpcAccessible& operator =(const xpcAccessible&) = delete; |
103 | | }; |
104 | | |
105 | | } // namespace a11y |
106 | | } // namespace mozilla |
107 | | |
108 | | #endif |