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
;
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
;
90 NS_IMETHOD
ScrollTo(uint32_t aHow
) final
;
91 NS_IMETHOD
ScrollToPoint(uint32_t aCoordinateType
, int32_t aX
,
94 NS_IMETHOD
Announce(const nsAString
& aAnnouncement
, uint16_t aPriority
) final
;
98 virtual ~xpcAccessible() {}
101 LocalAccessible
* Intl();
102 Accessible
* IntlGeneric();
104 xpcAccessible(const xpcAccessible
&) = delete;
105 xpcAccessible
& operator=(const xpcAccessible
&) = delete;
109 } // namespace mozilla