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"
18 class LocalAccessible
;
21 * XPCOM nsIAccessible interface implementation, used by xpcAccessibleGeneric
24 class xpcAccessible
: public 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
;
51 NS_IMETHOD
GetAccessKey(nsAString
& aAccessKey
) final
;
52 NS_IMETHOD
GetKeyboardShortcut(nsAString
& aKeyBinding
) final
;
54 NS_IMETHOD
GetAttributes(nsIPersistentProperties
** aAttributes
) final
;
56 NS_IMETHOD
GetCache(nsIPersistentProperties
** aCachedFields
) final
;
58 NS_IMETHOD
GetNativeInterface(nsISupports
** aNativeInterface
) final
;
60 NS_IMETHOD
GetBounds(int32_t* aX
, int32_t* aY
, int32_t* aWidth
,
61 int32_t* aHeight
) final
;
62 NS_IMETHOD
GetBoundsInCSSPixels(int32_t* aX
, int32_t* aY
, int32_t* aWidth
,
63 int32_t* aHeight
) final
;
64 NS_IMETHOD
GroupPosition(int32_t* aGroupLevel
, int32_t* aSimilarItemsInGroup
,
65 int32_t* aPositionInGroup
) final
;
66 NS_IMETHOD
GetRelationByType(uint32_t aType
,
67 nsIAccessibleRelation
** aRelation
) final
;
68 NS_IMETHOD
GetRelations(nsIArray
** aRelations
) final
;
70 NS_IMETHOD
GetFocusedChild(nsIAccessible
** aChild
) final
;
71 NS_IMETHOD
GetChildAtPoint(int32_t aX
, int32_t aY
,
72 nsIAccessible
** aAccessible
) final
;
73 NS_IMETHOD
GetDeepestChildAtPoint(int32_t aX
, int32_t aY
,
74 nsIAccessible
** aAccessible
) final
;
75 NS_IMETHOD
GetDeepestChildAtPointInProcess(int32_t aX
, int32_t aY
,
76 nsIAccessible
** aAccessible
) final
;
78 NS_IMETHOD
SetSelected(bool aSelect
) final
;
79 NS_IMETHOD
TakeSelection() final
;
80 NS_IMETHOD
TakeFocus() final
;
82 NS_IMETHOD
GetActionCount(uint8_t* aActionCount
) final
;
83 NS_IMETHOD
GetActionName(uint8_t aIndex
, nsAString
& aName
) final
;
84 NS_IMETHOD
GetActionDescription(uint8_t aIndex
,
85 nsAString
& aDescription
) final
;
86 NS_IMETHOD
DoAction(uint8_t aIndex
) final
;
89 NS_IMETHOD
ScrollTo(uint32_t aHow
) final
;
90 NS_IMETHOD
ScrollToPoint(uint32_t aCoordinateType
, int32_t aX
,
93 NS_IMETHOD
Announce(const nsAString
& aAnnouncement
, uint16_t aPriority
) final
;
95 NS_IMETHOD
GetComputedARIARole(nsAString
& aRole
) final
;
99 virtual ~xpcAccessible() {}
102 LocalAccessible
* Intl();
103 Accessible
* IntlGeneric();
105 xpcAccessible(const xpcAccessible
&) = delete;
106 xpcAccessible
& operator=(const xpcAccessible
&) = delete;
110 } // namespace mozilla