Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_a11y_sdnAccessible_h_
8 #define mozilla_a11y_sdnAccessible_h_
10 #include "ISimpleDOMNode.h"
11 #include "AccessibleWrap.h"
12 #include "IUnknownImpl.h"
14 #include "mozilla/Attributes.h"
16 namespace mozilla {
17 namespace a11y {
19 class sdnAccessible MOZ_FINAL : public ISimpleDOMNode
20 {
21 public:
22 sdnAccessible(nsINode* aNode) :
23 mNode(aNode)
24 {
25 if (!mNode)
26 MOZ_CRASH();
27 }
28 ~sdnAccessible() { }
30 /**
31 * Retrun if the object is defunct.
32 */
33 bool IsDefunct() const { return !GetDocument(); }
35 /**
36 * Return a document accessible it belongs to if any.
37 */
38 DocAccessible* GetDocument() const;
40 /*
41 * Return associated accessible if any.
42 */
43 Accessible* GetAccessible() const;
45 //IUnknown
46 DECL_IUNKNOWN
48 virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_nodeInfo(
49 /* [out] */ BSTR __RPC_FAR* aNodeName,
50 /* [out] */ short __RPC_FAR* aNameSpaceID,
51 /* [out] */ BSTR __RPC_FAR* aNodeValue,
52 /* [out] */ unsigned int __RPC_FAR* aNumChildren,
53 /* [out] */ unsigned int __RPC_FAR* aUniqueID,
54 /* [out][retval] */ unsigned short __RPC_FAR* aNodeType);
56 virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_attributes(
57 /* [in] */ unsigned short aMaxAttribs,
58 /* [length_is][size_is][out] */ BSTR __RPC_FAR* aAttribNames,
59 /* [length_is][size_is][out] */ short __RPC_FAR* aNameSpaceIDs,
60 /* [length_is][size_is][out] */ BSTR __RPC_FAR* aAttribValues,
61 /* [out][retval] */ unsigned short __RPC_FAR* aNumAttribs);
63 virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_attributesForNames(
64 /* [in] */ unsigned short aMaxAttribs,
65 /* [length_is][size_is][in] */ BSTR __RPC_FAR* aAttribNames,
66 /* [length_is][size_is][in] */ short __RPC_FAR* aNameSpaceID,
67 /* [length_is][size_is][retval] */ BSTR __RPC_FAR* aAttribValues);
69 virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_computedStyle(
70 /* [in] */ unsigned short aMaxStyleProperties,
71 /* [in] */ boolean aUseAlternateView,
72 /* [length_is][size_is][out] */ BSTR __RPC_FAR* aStyleProperties,
73 /* [length_is][size_is][out] */ BSTR __RPC_FAR* aStyleValues,
74 /* [out][retval] */ unsigned short __RPC_FAR* aNumStyleProperties);
76 virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_computedStyleForProperties(
77 /* [in] */ unsigned short aNumStyleProperties,
78 /* [in] */ boolean aUseAlternateView,
79 /* [length_is][size_is][in] */ BSTR __RPC_FAR* aStyleProperties,
80 /* [length_is][size_is][out][retval] */ BSTR __RPC_FAR* aStyleValues);
82 virtual HRESULT STDMETHODCALLTYPE scrollTo(/* [in] */ boolean aScrollTopLeft);
84 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_parentNode(
85 /* [out][retval] */ ISimpleDOMNode __RPC_FAR *__RPC_FAR* aNode);
87 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_firstChild(
88 /* [out][retval] */ ISimpleDOMNode __RPC_FAR *__RPC_FAR* aNode);
90 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_lastChild(
91 /* [out][retval] */ ISimpleDOMNode __RPC_FAR *__RPC_FAR* aNode);
93 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_previousSibling(
94 /* [out][retval] */ ISimpleDOMNode __RPC_FAR *__RPC_FAR* aNode);
96 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nextSibling(
97 /* [out][retval] */ ISimpleDOMNode __RPC_FAR *__RPC_FAR* aNode);
99 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_childAt(
100 /* [in] */ unsigned aChildIndex,
101 /* [out][retval] */ ISimpleDOMNode __RPC_FAR *__RPC_FAR* aNode);
103 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_innerHTML(
104 /* [out][retval] */ BSTR __RPC_FAR* aInnerHTML);
106 virtual /* [local][propget] */ HRESULT STDMETHODCALLTYPE get_localInterface(
107 /* [retval][out] */ void __RPC_FAR *__RPC_FAR* aLocalInterface);
109 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_language(
110 /* [out][retval] */ BSTR __RPC_FAR* aLanguage);
112 private:
113 nsCOMPtr<nsINode> mNode;
114 };
116 } // namespace a11y
117 } // namespace mozilla
119 #endif // mozilla_a11y_sdnAccessible_h_