accessible/src/windows/sdn/sdnTextAccessible.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/src/windows/sdn/sdnTextAccessible.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,71 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* vim: set ts=2 et sw=2 tw=80: */
     1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef mozilla_a11y_sdnTextAccessible_h_
    1.11 +#define mozilla_a11y_sdnTextAccessible_h_
    1.12 +
    1.13 +#include "ISimpleDOMText.h"
    1.14 +#include "IUnknownImpl.h"
    1.15 +
    1.16 +#include "AccessibleWrap.h"
    1.17 +
    1.18 +class nsIFrame;
    1.19 +class nsPoint;
    1.20 +
    1.21 +namespace mozilla {
    1.22 +namespace a11y {
    1.23 + 
    1.24 +class sdnTextAccessible MOZ_FINAL : public ISimpleDOMText
    1.25 +{
    1.26 +public:
    1.27 +  sdnTextAccessible(AccessibleWrap* aAccessible) : mAccessible(aAccessible) {};
    1.28 +  ~sdnTextAccessible() {}
    1.29 +
    1.30 +  DECL_IUNKNOWN
    1.31 +
    1.32 +  // ISimpleDOMText
    1.33 +
    1.34 +  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_domText(
    1.35 +    /* [retval][out] */ BSTR __RPC_FAR *aText);
    1.36 +
    1.37 +  virtual HRESULT STDMETHODCALLTYPE get_clippedSubstringBounds(
    1.38 +    /* [in] */ unsigned int startIndex,
    1.39 +    /* [in] */ unsigned int endIndex,
    1.40 +    /* [out] */ int __RPC_FAR* aX,
    1.41 +    /* [out] */ int __RPC_FAR* aY,
    1.42 +    /* [out] */ int __RPC_FAR* aWidth,
    1.43 +    /* [out] */ int __RPC_FAR* aHeight);
    1.44 +
    1.45 +  virtual HRESULT STDMETHODCALLTYPE get_unclippedSubstringBounds(
    1.46 +    /* [in] */ unsigned int aStartIndex,
    1.47 +    /* [in] */ unsigned int aEndIndex,
    1.48 +    /* [out] */ int __RPC_FAR* aX,
    1.49 +    /* [out] */ int __RPC_FAR* aY,
    1.50 +    /* [out] */ int __RPC_FAR* aWidth,
    1.51 +    /* [out] */ int __RPC_FAR* aHeight);
    1.52 +
    1.53 +  virtual HRESULT STDMETHODCALLTYPE scrollToSubstring(
    1.54 +    /* [in] */ unsigned int aStartIndex,
    1.55 +    /* [in] */ unsigned int aEndIndex);
    1.56 +
    1.57 +  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_fontFamily(
    1.58 +    /* [retval][out] */ BSTR __RPC_FAR* aFontFamily);
    1.59 +
    1.60 +private:
    1.61 +  /**
    1.62 +   *  Return child frame containing offset on success.
    1.63 +   */
    1.64 +  nsIFrame* GetPointFromOffset(nsIFrame* aContainingFrame,
    1.65 +                               int32_t aOffset, bool aPreferNext,
    1.66 +                               nsPoint& aOutPoint);
    1.67 +
    1.68 +  nsRefPtr<AccessibleWrap> mAccessible;
    1.69 +};
    1.70 +
    1.71 +} // namespace a11y
    1.72 +} // namespace mozilla
    1.73 +
    1.74 +#endif

mercurial