diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /accessible/windows/msaa/MsaaRootAccessible.h | |
parent | Initial commit. (diff) | |
download | firefox-upstream.tar.xz firefox-upstream.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'accessible/windows/msaa/MsaaRootAccessible.h')
-rw-r--r-- | accessible/windows/msaa/MsaaRootAccessible.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/accessible/windows/msaa/MsaaRootAccessible.h b/accessible/windows/msaa/MsaaRootAccessible.h new file mode 100644 index 0000000000..d2b3b89da1 --- /dev/null +++ b/accessible/windows/msaa/MsaaRootAccessible.h @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef mozilla_a11y_MsaaRootAccessible_h__ +#define mozilla_a11y_MsaaRootAccessible_h__ + +#include "mozilla/mscom/Aggregation.h" +#include "MsaaDocAccessible.h" + +namespace mozilla { + +namespace a11y { + +class MsaaRootAccessible : public MsaaDocAccessible { + public: + explicit MsaaRootAccessible(Accessible* aAcc) + : MsaaDocAccessible(aAcc), mOuter(&mInternalUnknown) {} + + /** + * This method enables a RootAccessibleWrap to be wrapped by a + * LazyInstantiator. + * + * @param aOuter The IUnknown of the object that is wrapping this + * RootAccessibleWrap, or nullptr to unwrap the aOuter from + * a previous call. + * @return This objects own IUnknown (as opposed to aOuter's IUnknown). + */ + already_AddRefed<IUnknown> Aggregate(IUnknown* aOuter); + + /** + * @return This object's own IUnknown, as opposed to its wrapper's IUnknown + * which is what would be returned by QueryInterface(IID_IUnknown). + */ + already_AddRefed<IUnknown> GetInternalUnknown(); + + virtual /* [id] */ HRESULT STDMETHODCALLTYPE accNavigate( + /* [in] */ long navDir, + /* [optional][in] */ VARIANT varStart, + /* [retval][out] */ VARIANT __RPC_FAR* pvarEndUpAt) override; + + private: + // DECLARE_AGGREGATABLE declares the internal IUnknown methods as well as + // mInternalUnknown. + DECLARE_AGGREGATABLE(MsaaRootAccessible); + IUnknown* mOuter; + + RootAccessible* RootAcc(); +}; + +} // namespace a11y +} // namespace mozilla + +#endif |