tor-browser

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

ia2Accessible.h (4187B)


      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
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef mozilla_a11y_ia2Accessible_h_
      8 #define mozilla_a11y_ia2Accessible_h_
      9 
     10 #include "nsISupports.h"
     11 #include "nsTArray.h"
     12 
     13 #include "Accessible2_2.h"
     14 
     15 namespace mozilla {
     16 namespace a11y {
     17 class Accessible;
     18 class AccAttributes;
     19 class AccessibleWrap;
     20 
     21 class ia2Accessible : public IAccessible2_2 {
     22 public:
     23  // IUnknown
     24  STDMETHODIMP QueryInterface(REFIID, void**);
     25 
     26  // IAccessible2
     27  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nRelations(
     28      /* [retval][out] */ long* nRelations);
     29 
     30  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_relation(
     31      /* [in] */ long relationIndex,
     32      /* [retval][out] */ IAccessibleRelation** relation);
     33 
     34  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_relations(
     35      /* [in] */ long maxRelations,
     36      /* [length_is][size_is][out] */ IAccessibleRelation** relation,
     37      /* [retval][out] */ long* nRelations);
     38 
     39  virtual HRESULT STDMETHODCALLTYPE role(
     40      /* [retval][out] */ long* role);
     41 
     42  virtual HRESULT STDMETHODCALLTYPE scrollTo(
     43      /* [in] */ enum IA2ScrollType scrollType);
     44 
     45  virtual HRESULT STDMETHODCALLTYPE scrollToPoint(
     46      /* [in] */ enum IA2CoordinateType coordinateType,
     47      /* [in] */ long x,
     48      /* [in] */ long y);
     49 
     50  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_groupPosition(
     51      /* [out] */ long* groupLevel,
     52      /* [out] */ long* similarItemsInGroup,
     53      /* [retval][out] */ long* positionInGroup);
     54 
     55  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_states(
     56      /* [retval][out] */ AccessibleStates* states);
     57 
     58  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_extendedRole(
     59      /* [retval][out] */ BSTR* extendedRole);
     60 
     61  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_localizedExtendedRole(
     62      /* [retval][out] */ BSTR* localizedExtendedRole);
     63 
     64  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nExtendedStates(
     65      /* [retval][out] */ long* nExtendedStates);
     66 
     67  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_extendedStates(
     68      /* [in] */ long maxExtendedStates,
     69      /* [length_is][length_is][size_is][size_is][out] */ BSTR** extendedStates,
     70      /* [retval][out] */ long* nExtendedStates);
     71 
     72  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_localizedExtendedStates(
     73      /* [in] */ long maxLocalizedExtendedStates,
     74      /* [length_is][length_is][size_is][size_is][out] */
     75      BSTR** localizedExtendedStates,
     76      /* [retval][out] */ long* nLocalizedExtendedStates);
     77 
     78  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_uniqueID(
     79      /* [retval][out] */ long* uniqueID);
     80 
     81  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_windowHandle(
     82      /* [retval][out] */ HWND* windowHandle);
     83 
     84  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_indexInParent(
     85      /* [retval][out] */ long* indexInParent);
     86 
     87  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_locale(
     88      /* [retval][out] */ IA2Locale* locale);
     89 
     90  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_attributes(
     91      /* [retval][out] */ BSTR* attributes);
     92 
     93  // IAccessible2_2
     94  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_attribute(
     95      /* [in] */ BSTR name,
     96      /* [out, retval] */ VARIANT* attribute);
     97 
     98  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_accessibleWithCaret(
     99      /* [out] */ IUnknown** accessible,
    100      /* [out, retval] */ long* caretOffset);
    101 
    102  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_relationTargetsOfType(
    103      /* [in] */ BSTR type,
    104      /* [in] */ long maxTargets,
    105      /* [out, size_is(,*nTargets)] */ IUnknown*** targets,
    106      /* [out, retval] */ long* nTargets);
    107 
    108  // Helper method
    109  static HRESULT ConvertToIA2Attributes(AccAttributes* aAttributes,
    110                                        BSTR* aIA2Attributes);
    111 
    112 private:
    113  AccessibleWrap* LocalAcc();
    114  Accessible* Acc();
    115 };
    116 
    117 }  // namespace a11y
    118 }  // namespace mozilla
    119 
    120 #endif