|
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* vim:expandtab:shiftwidth=2:tabstop=2: |
|
3 */ |
|
4 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
5 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
7 |
|
8 #ifndef _ACCESSIBLE_ACTION_H |
|
9 #define _ACCESSIBLE_ACTION_H |
|
10 |
|
11 #include "nsISupports.h" |
|
12 |
|
13 #include "AccessibleAction.h" |
|
14 |
|
15 namespace mozilla { |
|
16 namespace a11y { |
|
17 |
|
18 class ia2AccessibleAction: public IAccessibleAction |
|
19 { |
|
20 public: |
|
21 |
|
22 // IUnknown |
|
23 STDMETHODIMP QueryInterface(REFIID, void**); |
|
24 |
|
25 // IAccessibleAction |
|
26 virtual HRESULT STDMETHODCALLTYPE nActions( |
|
27 /* [retval][out] */ long *nActions); |
|
28 |
|
29 virtual HRESULT STDMETHODCALLTYPE doAction( |
|
30 /* [in] */ long actionIndex); |
|
31 |
|
32 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_description( |
|
33 /* [in] */ long actionIndex, |
|
34 /* [retval][out] */ BSTR *description); |
|
35 |
|
36 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_keyBinding( |
|
37 /* [in] */ long actionIndex, |
|
38 /* [in] */ long nMaxBinding, |
|
39 /* [length_is][length_is][size_is][size_is][out] */ BSTR **keyBinding, |
|
40 /* [retval][out] */ long *nBinding); |
|
41 |
|
42 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_name( |
|
43 /* [in] */ long actionIndex, |
|
44 /* [retval][out] */ BSTR *name); |
|
45 |
|
46 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_localizedName( |
|
47 /* [in] */ long actionIndex, |
|
48 /* [retval][out] */ BSTR *localizedName); |
|
49 |
|
50 }; |
|
51 |
|
52 } // namespace a11y |
|
53 } // namespace mozilla |
|
54 |
|
55 #define FORWARD_IACCESSIBLEACTION(Class) \ |
|
56 virtual HRESULT STDMETHODCALLTYPE nActions(long *nActions) \ |
|
57 { \ |
|
58 return Class::nActions(nActions); \ |
|
59 } \ |
|
60 \ |
|
61 virtual HRESULT STDMETHODCALLTYPE doAction(long actionIndex) \ |
|
62 { \ |
|
63 return Class::doAction(actionIndex); \ |
|
64 } \ |
|
65 \ |
|
66 virtual HRESULT STDMETHODCALLTYPE get_description(long actionIndex, \ |
|
67 BSTR *description) \ |
|
68 { \ |
|
69 return Class::get_description(actionIndex, description); \ |
|
70 } \ |
|
71 \ |
|
72 virtual HRESULT STDMETHODCALLTYPE get_keyBinding(long actionIndex, \ |
|
73 long nMaxBinding, \ |
|
74 BSTR **keyBinding, \ |
|
75 long *nBinding) \ |
|
76 { \ |
|
77 return Class::get_keyBinding(actionIndex, nMaxBinding, keyBinding, nBinding);\ |
|
78 } \ |
|
79 \ |
|
80 virtual HRESULT STDMETHODCALLTYPE get_name(long actionIndex, BSTR *name) \ |
|
81 { \ |
|
82 return Class::get_name(actionIndex, name); \ |
|
83 } \ |
|
84 \ |
|
85 virtual HRESULT STDMETHODCALLTYPE get_localizedName(long actionIndex, \ |
|
86 BSTR *localizedName) \ |
|
87 { \ |
|
88 return Class::get_localizedName(actionIndex, localizedName); \ |
|
89 } \ |
|
90 \ |
|
91 |
|
92 #endif |
|
93 |