summaryrefslogtreecommitdiffstats
path: root/accessible/windows/msaa/RootAccessibleWrap.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /accessible/windows/msaa/RootAccessibleWrap.h
parentInitial commit. (diff)
downloadfirefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz
firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'accessible/windows/msaa/RootAccessibleWrap.h')
-rw-r--r--accessible/windows/msaa/RootAccessibleWrap.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/accessible/windows/msaa/RootAccessibleWrap.h b/accessible/windows/msaa/RootAccessibleWrap.h
new file mode 100644
index 0000000000..1db6a5557c
--- /dev/null
+++ b/accessible/windows/msaa/RootAccessibleWrap.h
@@ -0,0 +1,61 @@
+/* -*- 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_RootAccessibleWrap_h__
+#define mozilla_a11y_RootAccessibleWrap_h__
+
+#include "mozilla/mscom/Aggregation.h"
+#include "RootAccessible.h"
+
+namespace mozilla {
+
+class PresShell;
+
+namespace a11y {
+
+class RootAccessibleWrap : public RootAccessible {
+ public:
+ RootAccessibleWrap(dom::Document* aDocument, PresShell* aPresShell);
+ virtual ~RootAccessibleWrap();
+
+ // RootAccessible
+ virtual void DocumentActivated(DocAccessible* aDocument);
+
+ /**
+ * 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;
+
+ virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_accFocus(
+ /* [retval][out] */ VARIANT __RPC_FAR* pvarChild) override;
+
+ private:
+ // DECLARE_AGGREGATABLE declares the internal IUnknown methods as well as
+ // mInternalUnknown.
+ DECLARE_AGGREGATABLE(RootAccessibleWrap);
+ IUnknown* mOuter;
+};
+
+} // namespace a11y
+} // namespace mozilla
+
+#endif