tor-browser

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

ia2AccessibleTextSelectionContainer.h (1474B)


      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_WINDOWS_IA2_ACCESSIBLETEXTSELECTIONCONTAINER_H_
      9 #define ACCESSIBLE_WINDOWS_IA2_ACCESSIBLETEXTSELECTIONCONTAINER_H_
     10 
     11 #include "AccessibleTextSelectionContainer.h"
     12 #include "mozilla/Attributes.h"
     13 
     14 template <class T>
     15 class RefPtr;
     16 
     17 namespace mozilla::a11y {
     18 class Accessible;
     19 class HyperTextAccessibleBase;
     20 class TextLeafPoint;
     21 
     22 class ia2AccessibleTextSelectionContainer
     23    : public IAccessibleTextSelectionContainer {
     24 public:
     25  // IAccessibleTextSelectionContainer
     26  /* [propget] */ HRESULT STDMETHODCALLTYPE get_selections(
     27      /* [out, size_is(,*nSelections)] */ IA2TextSelection** selections,
     28      /* [out, retval] */ long* nSelections) override;
     29  MOZ_CAN_RUN_SCRIPT_BOUNDARY
     30  HRESULT STDMETHODCALLTYPE setSelections(
     31      /* [in] */ long nSelections,
     32      /* [in, size_is(nSelections)] */ IA2TextSelection* selections) override;
     33 
     34 private:
     35  HyperTextAccessibleBase* TextAcc();
     36  static RefPtr<IAccessibleText> GetIATextFrom(Accessible* aAcc);
     37  static TextLeafPoint GetTextLeafPointFrom(IAccessibleText* aText,
     38                                            long aOffset);
     39 };
     40 
     41 }  // namespace mozilla::a11y
     42 
     43 #endif