tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

ia2AccessibleAction.h (3826B)


      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 "mozilla/a11y/Accessible.h"
     14 #include "AccessibleAction.h"
     15 
     16 namespace mozilla {
     17 namespace a11y {
     18 
     19 class ia2AccessibleAction : public IAccessibleAction {
     20 public:
     21  // IUnknown
     22  STDMETHODIMP QueryInterface(REFIID, void**);
     23 
     24  // IAccessibleAction
     25  virtual HRESULT STDMETHODCALLTYPE nActions(
     26      /* [retval][out] */ long* nActions);
     27 
     28  virtual HRESULT STDMETHODCALLTYPE doAction(
     29      /* [in] */ long actionIndex);
     30 
     31  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_description(
     32      /* [in] */ long actionIndex,
     33      /* [retval][out] */ BSTR* description);
     34 
     35  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_keyBinding(
     36      /* [in] */ long actionIndex,
     37      /* [in] */ long nMaxBinding,
     38      /* [length_is][length_is][size_is][size_is][out] */ BSTR** keyBinding,
     39      /* [retval][out] */ long* nBinding);
     40 
     41  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_name(
     42      /* [in] */ long actionIndex,
     43      /* [retval][out] */ BSTR* name);
     44 
     45  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_localizedName(
     46      /* [in] */ long actionIndex,
     47      /* [retval][out] */ BSTR* localizedName);
     48 
     49 private:
     50  Accessible* Acc();
     51 };
     52 
     53 }  // namespace a11y
     54 }  // namespace mozilla
     55 
     56 #define FORWARD_IACCESSIBLEACTION(Class)                                       \
     57  virtual HRESULT STDMETHODCALLTYPE nActions(long* nActions) {                 \
     58    return Class::nActions(nActions);                                          \
     59  }                                                                            \
     60                                                                               \
     61  virtual HRESULT STDMETHODCALLTYPE doAction(long actionIndex) {               \
     62    return Class::doAction(actionIndex);                                       \
     63  }                                                                            \
     64                                                                               \
     65  virtual HRESULT STDMETHODCALLTYPE get_description(long actionIndex,          \
     66                                                    BSTR* description) {       \
     67    return Class::get_description(actionIndex, description);                   \
     68  }                                                                            \
     69                                                                               \
     70  virtual HRESULT STDMETHODCALLTYPE get_keyBinding(                            \
     71      long actionIndex, long nMaxBinding, BSTR** keyBinding, long* nBinding) { \
     72    return Class::get_keyBinding(actionIndex, nMaxBinding, keyBinding,         \
     73                                 nBinding);                                    \
     74  }                                                                            \
     75                                                                               \
     76  virtual HRESULT STDMETHODCALLTYPE get_name(long actionIndex, BSTR* name) {   \
     77    return Class::get_name(actionIndex, name);                                 \
     78  }                                                                            \
     79                                                                               \
     80  virtual HRESULT STDMETHODCALLTYPE get_localizedName(long actionIndex,        \
     81                                                      BSTR* localizedName) {   \
     82    return Class::get_localizedName(actionIndex, localizedName);               \
     83  }
     84 
     85 #endif