ia2AccessibleHypertext.h (2259B)
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_HYPERTEXT_H 9 #define _ACCESSIBLE_HYPERTEXT_H 10 11 #include "nsISupports.h" 12 13 #include "ia2AccessibleEditableText.h" 14 #include "ia2AccessibleText.h" 15 #include "ia2AccessibleTextSelectionContainer.h" 16 #include "AccessibleHypertext2.h" 17 #include "IUnknownImpl.h" 18 #include "MsaaAccessible.h" 19 20 namespace mozilla { 21 namespace a11y { 22 class HyperTextAccessibleBase; 23 24 class ia2AccessibleHypertext : public ia2AccessibleText, 25 public IAccessibleHypertext2, 26 public ia2AccessibleEditableText, 27 public ia2AccessibleTextSelectionContainer, 28 public MsaaAccessible { 29 public: 30 // IUnknown 31 DECL_IUNKNOWN_INHERITED 32 IMPL_IUNKNOWN_REFCOUNTING_INHERITED(MsaaAccessible) 33 34 // IAccessible2 35 // We indirectly inherit IAccessible2, which has a get_attributes method, 36 // but IAccessibleText also has a get_attributes method with a different 37 // signature. We want both. 38 using MsaaAccessible::get_attributes; 39 40 // IAccessibleText 41 FORWARD_IACCESSIBLETEXT(ia2AccessibleText) 42 43 // IAccessibleHypertext 44 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nHyperlinks( 45 /* [retval][out] */ long* hyperlinkCount); 46 47 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_hyperlink( 48 /* [in] */ long index, 49 /* [retval][out] */ IAccessibleHyperlink** hyperlink); 50 51 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_hyperlinkIndex( 52 /* [in] */ long charIndex, 53 /* [retval][out] */ long* hyperlinkIndex); 54 55 // IAccessibleHypertext2 56 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_hyperlinks( 57 /* [out, size_is(,*nHyperlinks)] */ IAccessibleHyperlink*** hyperlinks, 58 /* [out, retval] */ long* nHyperlinks); 59 60 protected: 61 using MsaaAccessible::MsaaAccessible; 62 63 private: 64 HyperTextAccessibleBase* TextAcc(); 65 }; 66 67 } // namespace a11y 68 } // namespace mozilla 69 70 #endif