tor-browser

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

UiaText.h (1812B)


      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 file,
      5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef mozilla_a11y_UiaText_h__
      8 #define mozilla_a11y_UiaText_h__
      9 
     10 #include "objbase.h"
     11 #include "uiautomation.h"
     12 
     13 #include "IUnknownImpl.h"
     14 #include "mozilla/RefPtr.h"
     15 
     16 namespace mozilla::a11y {
     17 class Accessible;
     18 class MsaaAccessible;
     19 
     20 /**
     21 * ITextProvider implementation.
     22 */
     23 class UiaText : public ITextProvider {
     24 public:
     25  explicit UiaText(MsaaAccessible* aMsaa);
     26 
     27  // IUnknown
     28  DECL_IUNKNOWN
     29 
     30  // ITextProvider
     31  virtual HRESULT STDMETHODCALLTYPE GetSelection(
     32      /* [retval][out] */ __RPC__deref_out_opt SAFEARRAY** aRetVal);
     33 
     34  virtual HRESULT STDMETHODCALLTYPE GetVisibleRanges(
     35      /* [retval][out] */ __RPC__deref_out_opt SAFEARRAY** aRetVal);
     36 
     37  virtual HRESULT STDMETHODCALLTYPE RangeFromChild(
     38      /* [in] */ __RPC__in_opt IRawElementProviderSimple* aChildElement,
     39      /* [retval][out] */ __RPC__deref_out_opt ITextRangeProvider** aRetVal);
     40 
     41  virtual HRESULT STDMETHODCALLTYPE RangeFromPoint(
     42      /* [in] */ struct UiaPoint aPoint,
     43      /* [retval][out] */ __RPC__deref_out_opt ITextRangeProvider** aRetVal);
     44 
     45  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_DocumentRange(
     46      /* [retval][out] */ __RPC__deref_out_opt ITextRangeProvider** aRetVal);
     47 
     48  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_SupportedTextSelection(
     49      /* [retval][out] */ __RPC__out enum SupportedTextSelection* aRetVal);
     50 
     51 private:
     52  virtual ~UiaText() = default;
     53  Accessible* Acc() const;
     54 
     55  RefPtr<MsaaAccessible> mMsaa;
     56 };
     57 
     58 }  // namespace mozilla::a11y
     59 
     60 #endif