|
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_uiaRawElmProvider_h__ |
|
8 #define mozilla_a11y_uiaRawElmProvider_h__ |
|
9 |
|
10 #include "objbase.h" |
|
11 #include "AccessibleWrap.h" |
|
12 #include "IUnknownImpl.h" |
|
13 #include "uiautomation.h" |
|
14 |
|
15 namespace mozilla { |
|
16 namespace a11y { |
|
17 |
|
18 class AccessibleWrap; |
|
19 |
|
20 /** |
|
21 * IRawElementProviderSimple implementation (maintains IAccessibleEx approach). |
|
22 */ |
|
23 class uiaRawElmProvider MOZ_FINAL : public IAccessibleEx, |
|
24 public IRawElementProviderSimple |
|
25 { |
|
26 public: |
|
27 uiaRawElmProvider(AccessibleWrap* aAcc) : mAcc(aAcc) { } |
|
28 |
|
29 // IUnknown |
|
30 DECL_IUNKNOWN |
|
31 |
|
32 // IAccessibleEx |
|
33 virtual HRESULT STDMETHODCALLTYPE GetObjectForChild( |
|
34 /* [in] */ long aIdChild, |
|
35 /* [retval][out] */ __RPC__deref_out_opt IAccessibleEx** aAccEx); |
|
36 |
|
37 virtual HRESULT STDMETHODCALLTYPE GetIAccessiblePair( |
|
38 /* [out] */ __RPC__deref_out_opt IAccessible** aAcc, |
|
39 /* [out] */ __RPC__out long* aIdChild); |
|
40 |
|
41 virtual HRESULT STDMETHODCALLTYPE GetRuntimeId( |
|
42 /* [retval][out] */ __RPC__deref_out_opt SAFEARRAY** aRuntimeIds); |
|
43 |
|
44 virtual HRESULT STDMETHODCALLTYPE ConvertReturnedElement( |
|
45 /* [in] */ __RPC__in_opt IRawElementProviderSimple* aRawElmProvider, |
|
46 /* [out] */ __RPC__deref_out_opt IAccessibleEx** aAccEx); |
|
47 |
|
48 // IRawElementProviderSimple |
|
49 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ProviderOptions( |
|
50 /* [retval][out] */ __RPC__out enum ProviderOptions* aProviderOptions); |
|
51 |
|
52 virtual HRESULT STDMETHODCALLTYPE GetPatternProvider( |
|
53 /* [in] */ PATTERNID aPatternId, |
|
54 /* [retval][out] */ __RPC__deref_out_opt IUnknown** aPatternProvider); |
|
55 |
|
56 virtual HRESULT STDMETHODCALLTYPE GetPropertyValue( |
|
57 /* [in] */ PROPERTYID aPropertyId, |
|
58 /* [retval][out] */ __RPC__out VARIANT* aPropertyValue); |
|
59 |
|
60 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_HostRawElementProvider( |
|
61 /* [retval][out] */ __RPC__deref_out_opt IRawElementProviderSimple** aRawElmProvider); |
|
62 |
|
63 private: |
|
64 uiaRawElmProvider() MOZ_DELETE; |
|
65 uiaRawElmProvider& operator =(const uiaRawElmProvider&) MOZ_DELETE; |
|
66 uiaRawElmProvider(const uiaRawElmProvider&) MOZ_DELETE; |
|
67 |
|
68 protected: |
|
69 nsRefPtr<AccessibleWrap> mAcc; |
|
70 }; |
|
71 |
|
72 } // a11y namespace |
|
73 } // mozilla namespace |
|
74 |
|
75 #endif |