accessible/src/windows/ia2/ia2AccessibleAction.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/src/windows/ia2/ia2AccessibleAction.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,93 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* vim:expandtab:shiftwidth=2:tabstop=2:
     1.6 + */
     1.7 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.8 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.9 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
    1.10 +
    1.11 +#ifndef _ACCESSIBLE_ACTION_H
    1.12 +#define _ACCESSIBLE_ACTION_H
    1.13 +
    1.14 +#include "nsISupports.h"
    1.15 +
    1.16 +#include "AccessibleAction.h"
    1.17 +
    1.18 +namespace mozilla {
    1.19 +namespace a11y {
    1.20 +
    1.21 +class ia2AccessibleAction: public IAccessibleAction
    1.22 +{
    1.23 +public:
    1.24 +
    1.25 +  // IUnknown
    1.26 +  STDMETHODIMP QueryInterface(REFIID, void**);
    1.27 +
    1.28 +  // IAccessibleAction
    1.29 +  virtual HRESULT STDMETHODCALLTYPE nActions(
    1.30 +      /* [retval][out] */ long *nActions);
    1.31 +
    1.32 +  virtual HRESULT STDMETHODCALLTYPE doAction(
    1.33 +      /* [in] */ long actionIndex);
    1.34 +
    1.35 +  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_description(
    1.36 +      /* [in] */ long actionIndex,
    1.37 +      /* [retval][out] */ BSTR *description);
    1.38 +
    1.39 +  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_keyBinding(
    1.40 +      /* [in] */ long actionIndex,
    1.41 +      /* [in] */ long nMaxBinding,
    1.42 +      /* [length_is][length_is][size_is][size_is][out] */ BSTR **keyBinding,
    1.43 +      /* [retval][out] */ long *nBinding);
    1.44 +
    1.45 +  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_name(
    1.46 +      /* [in] */ long actionIndex,
    1.47 +      /* [retval][out] */ BSTR *name);
    1.48 +
    1.49 +  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_localizedName(
    1.50 +      /* [in] */ long actionIndex,
    1.51 +      /* [retval][out] */ BSTR *localizedName);
    1.52 +
    1.53 +};
    1.54 +
    1.55 +} // namespace a11y
    1.56 +} // namespace mozilla
    1.57 +
    1.58 +#define FORWARD_IACCESSIBLEACTION(Class)                                       \
    1.59 +virtual HRESULT STDMETHODCALLTYPE nActions(long *nActions)                     \
    1.60 +{                                                                              \
    1.61 +  return Class::nActions(nActions);                                            \
    1.62 +}                                                                              \
    1.63 +                                                                               \
    1.64 +virtual HRESULT STDMETHODCALLTYPE doAction(long actionIndex)                   \
    1.65 +{                                                                              \
    1.66 +  return Class::doAction(actionIndex);                                         \
    1.67 +}                                                                              \
    1.68 +                                                                               \
    1.69 +virtual HRESULT STDMETHODCALLTYPE get_description(long actionIndex,            \
    1.70 +                                                  BSTR *description)           \
    1.71 +{                                                                              \
    1.72 +  return Class::get_description(actionIndex, description);                     \
    1.73 +}                                                                              \
    1.74 +                                                                               \
    1.75 +virtual HRESULT STDMETHODCALLTYPE get_keyBinding(long actionIndex,             \
    1.76 +                                                 long nMaxBinding,             \
    1.77 +                                                 BSTR **keyBinding,            \
    1.78 +                                                 long *nBinding)               \
    1.79 +{                                                                              \
    1.80 +  return Class::get_keyBinding(actionIndex, nMaxBinding, keyBinding, nBinding);\
    1.81 +}                                                                              \
    1.82 +                                                                               \
    1.83 +virtual HRESULT STDMETHODCALLTYPE get_name(long actionIndex, BSTR *name)       \
    1.84 +{                                                                              \
    1.85 +  return Class::get_name(actionIndex, name);                                   \
    1.86 +}                                                                              \
    1.87 +                                                                               \
    1.88 +virtual HRESULT STDMETHODCALLTYPE get_localizedName(long actionIndex,          \
    1.89 +                                                    BSTR *localizedName)       \
    1.90 +{                                                                              \
    1.91 +  return Class::get_localizedName(actionIndex, localizedName);                 \
    1.92 +}                                                                              \
    1.93 +                                                                               \
    1.94 +
    1.95 +#endif
    1.96 +

mercurial