accessible/src/windows/sdn/sdnTextAccessible.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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/. */
     7 #ifndef mozilla_a11y_sdnTextAccessible_h_
     8 #define mozilla_a11y_sdnTextAccessible_h_
    10 #include "ISimpleDOMText.h"
    11 #include "IUnknownImpl.h"
    13 #include "AccessibleWrap.h"
    15 class nsIFrame;
    16 class nsPoint;
    18 namespace mozilla {
    19 namespace a11y {
    21 class sdnTextAccessible MOZ_FINAL : public ISimpleDOMText
    22 {
    23 public:
    24   sdnTextAccessible(AccessibleWrap* aAccessible) : mAccessible(aAccessible) {};
    25   ~sdnTextAccessible() {}
    27   DECL_IUNKNOWN
    29   // ISimpleDOMText
    31   virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_domText(
    32     /* [retval][out] */ BSTR __RPC_FAR *aText);
    34   virtual HRESULT STDMETHODCALLTYPE get_clippedSubstringBounds(
    35     /* [in] */ unsigned int startIndex,
    36     /* [in] */ unsigned int endIndex,
    37     /* [out] */ int __RPC_FAR* aX,
    38     /* [out] */ int __RPC_FAR* aY,
    39     /* [out] */ int __RPC_FAR* aWidth,
    40     /* [out] */ int __RPC_FAR* aHeight);
    42   virtual HRESULT STDMETHODCALLTYPE get_unclippedSubstringBounds(
    43     /* [in] */ unsigned int aStartIndex,
    44     /* [in] */ unsigned int aEndIndex,
    45     /* [out] */ int __RPC_FAR* aX,
    46     /* [out] */ int __RPC_FAR* aY,
    47     /* [out] */ int __RPC_FAR* aWidth,
    48     /* [out] */ int __RPC_FAR* aHeight);
    50   virtual HRESULT STDMETHODCALLTYPE scrollToSubstring(
    51     /* [in] */ unsigned int aStartIndex,
    52     /* [in] */ unsigned int aEndIndex);
    54   virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_fontFamily(
    55     /* [retval][out] */ BSTR __RPC_FAR* aFontFamily);
    57 private:
    58   /**
    59    *  Return child frame containing offset on success.
    60    */
    61   nsIFrame* GetPointFromOffset(nsIFrame* aContainingFrame,
    62                                int32_t aOffset, bool aPreferNext,
    63                                nsPoint& aOutPoint);
    65   nsRefPtr<AccessibleWrap> mAccessible;
    66 };
    68 } // namespace a11y
    69 } // namespace mozilla
    71 #endif

mercurial