Bug 1867925 - Mark some storage-access-api tests as intermittent after wpt-sync....
[gecko.git] / accessible / windows / sdn / sdnTextAccessible.h
blob3f93c20fcc959bd7b7c5fd8ec6e325a3508eef3d
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 "ISimpleDOM.h"
11 #include "IUnknownImpl.h"
13 #include "MsaaAccessible.h"
15 class nsIFrame;
16 struct nsPoint;
18 namespace mozilla {
19 namespace a11y {
21 class sdnTextAccessible final : public ISimpleDOMText {
22 public:
23 explicit sdnTextAccessible(MsaaAccessible* aMsaa) : mMsaa(aMsaa){};
24 ~sdnTextAccessible() {}
26 DECL_IUNKNOWN
28 // ISimpleDOMText
30 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_domText(
31 /* [retval][out] */ BSTR __RPC_FAR* aText);
33 virtual HRESULT STDMETHODCALLTYPE get_clippedSubstringBounds(
34 /* [in] */ unsigned int startIndex,
35 /* [in] */ unsigned int endIndex,
36 /* [out] */ int __RPC_FAR* aX,
37 /* [out] */ int __RPC_FAR* aY,
38 /* [out] */ int __RPC_FAR* aWidth,
39 /* [out] */ int __RPC_FAR* aHeight);
41 virtual HRESULT STDMETHODCALLTYPE get_unclippedSubstringBounds(
42 /* [in] */ unsigned int aStartIndex,
43 /* [in] */ unsigned int aEndIndex,
44 /* [out] */ int __RPC_FAR* aX,
45 /* [out] */ int __RPC_FAR* aY,
46 /* [out] */ int __RPC_FAR* aWidth,
47 /* [out] */ int __RPC_FAR* aHeight);
49 virtual HRESULT STDMETHODCALLTYPE scrollToSubstring(
50 /* [in] */ unsigned int aStartIndex,
51 /* [in] */ unsigned int aEndIndex);
53 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_fontFamily(
54 /* [retval][out] */ BSTR __RPC_FAR* aFontFamily);
56 private:
57 /**
58 * Return child frame containing offset on success.
60 nsIFrame* GetPointFromOffset(nsIFrame* aContainingFrame, int32_t aOffset,
61 bool aPreferNext, nsPoint& aOutPoint);
63 RefPtr<MsaaAccessible> mMsaa;
66 } // namespace a11y
67 } // namespace mozilla
69 #endif