michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim:expandtab:shiftwidth=2:tabstop=2: michael@0: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef _ACCESSIBLE_ACTION_H michael@0: #define _ACCESSIBLE_ACTION_H michael@0: michael@0: #include "nsISupports.h" michael@0: michael@0: #include "AccessibleAction.h" michael@0: michael@0: namespace mozilla { michael@0: namespace a11y { michael@0: michael@0: class ia2AccessibleAction: public IAccessibleAction michael@0: { michael@0: public: michael@0: michael@0: // IUnknown michael@0: STDMETHODIMP QueryInterface(REFIID, void**); michael@0: michael@0: // IAccessibleAction michael@0: virtual HRESULT STDMETHODCALLTYPE nActions( michael@0: /* [retval][out] */ long *nActions); michael@0: michael@0: virtual HRESULT STDMETHODCALLTYPE doAction( michael@0: /* [in] */ long actionIndex); michael@0: michael@0: virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_description( michael@0: /* [in] */ long actionIndex, michael@0: /* [retval][out] */ BSTR *description); michael@0: michael@0: virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_keyBinding( michael@0: /* [in] */ long actionIndex, michael@0: /* [in] */ long nMaxBinding, michael@0: /* [length_is][length_is][size_is][size_is][out] */ BSTR **keyBinding, michael@0: /* [retval][out] */ long *nBinding); michael@0: michael@0: virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_name( michael@0: /* [in] */ long actionIndex, michael@0: /* [retval][out] */ BSTR *name); michael@0: michael@0: virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_localizedName( michael@0: /* [in] */ long actionIndex, michael@0: /* [retval][out] */ BSTR *localizedName); michael@0: michael@0: }; michael@0: michael@0: } // namespace a11y michael@0: } // namespace mozilla michael@0: michael@0: #define FORWARD_IACCESSIBLEACTION(Class) \ michael@0: virtual HRESULT STDMETHODCALLTYPE nActions(long *nActions) \ michael@0: { \ michael@0: return Class::nActions(nActions); \ michael@0: } \ michael@0: \ michael@0: virtual HRESULT STDMETHODCALLTYPE doAction(long actionIndex) \ michael@0: { \ michael@0: return Class::doAction(actionIndex); \ michael@0: } \ michael@0: \ michael@0: virtual HRESULT STDMETHODCALLTYPE get_description(long actionIndex, \ michael@0: BSTR *description) \ michael@0: { \ michael@0: return Class::get_description(actionIndex, description); \ michael@0: } \ michael@0: \ michael@0: virtual HRESULT STDMETHODCALLTYPE get_keyBinding(long actionIndex, \ michael@0: long nMaxBinding, \ michael@0: BSTR **keyBinding, \ michael@0: long *nBinding) \ michael@0: { \ michael@0: return Class::get_keyBinding(actionIndex, nMaxBinding, keyBinding, nBinding);\ michael@0: } \ michael@0: \ michael@0: virtual HRESULT STDMETHODCALLTYPE get_name(long actionIndex, BSTR *name) \ michael@0: { \ michael@0: return Class::get_name(actionIndex, name); \ michael@0: } \ michael@0: \ michael@0: virtual HRESULT STDMETHODCALLTYPE get_localizedName(long actionIndex, \ michael@0: BSTR *localizedName) \ michael@0: { \ michael@0: return Class::get_localizedName(actionIndex, localizedName); \ michael@0: } \ michael@0: \ michael@0: michael@0: #endif michael@0: