Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qwindowsuiamainprovider.h
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QWINDOWSUIAMAINPROVIDER_H
5#define QWINDOWSUIAMAINPROVIDER_H
6
7#include <QtGui/qtguiglobal.h>
8#if QT_CONFIG(accessibility)
9
11
12#include <QtCore/qpointer.h>
13#include <QtCore/qsharedpointer.h>
14#include <QtCore/qmutex.h>
15#include <QtCore/qt_windows.h>
16#include <QtGui/qaccessible.h>
17
19
20// The main UI Automation class.
21class QWindowsUiaMainProvider :
22 public QWindowsUiaBaseProvider,
23 public IRawElementProviderSimple,
26{
28 Q_DISABLE_COPY_MOVE(QWindowsUiaMainProvider)
29public:
30 static QWindowsUiaMainProvider *providerForAccessible(QAccessibleInterface *accessible);
31 explicit QWindowsUiaMainProvider(QAccessibleInterface *a, int initialRefCount = 1);
32 virtual ~QWindowsUiaMainProvider();
33 static void notifyFocusChange(QAccessibleEvent *event);
34 static void notifyStateChange(QAccessibleStateChangeEvent *event);
35 static void notifyValueChange(QAccessibleValueChangeEvent *event);
36 static void notifyNameChange(QAccessibleEvent *event);
37 static void notifySelectionChange(QAccessibleEvent *event);
38 static void notifyTextChange(QAccessibleEvent *event);
39
40 // IUnknown
41 HRESULT STDMETHODCALLTYPE QueryInterface(REFIID id, LPVOID *iface) override;
42 ULONG STDMETHODCALLTYPE AddRef() override;
43 ULONG STDMETHODCALLTYPE Release() override;
44
45 // IRawElementProviderSimple methods
46 HRESULT STDMETHODCALLTYPE get_ProviderOptions(ProviderOptions *pRetVal) override;
47 HRESULT STDMETHODCALLTYPE GetPatternProvider(PATTERNID idPattern, IUnknown **pRetVal) override;
48 HRESULT STDMETHODCALLTYPE GetPropertyValue(PROPERTYID idProp, VARIANT *pRetVal) override;
49 HRESULT STDMETHODCALLTYPE get_HostRawElementProvider(IRawElementProviderSimple **pRetVal) override;
50
51 // IRawElementProviderFragment methods
52 HRESULT STDMETHODCALLTYPE Navigate(NavigateDirection direction, IRawElementProviderFragment **pRetVal) override;
53 HRESULT STDMETHODCALLTYPE GetRuntimeId(SAFEARRAY **pRetVal) override;
54 HRESULT STDMETHODCALLTYPE get_BoundingRectangle(UiaRect *pRetVal) override;
55 HRESULT STDMETHODCALLTYPE GetEmbeddedFragmentRoots(SAFEARRAY **pRetVal) override;
56 HRESULT STDMETHODCALLTYPE SetFocus() override;
58
59 // IRawElementProviderFragmentRoot methods
60 HRESULT STDMETHODCALLTYPE ElementProviderFromPoint(double x, double y, IRawElementProviderFragment **pRetVal) override;
61 HRESULT STDMETHODCALLTYPE GetFocus(IRawElementProviderFragment **pRetVal) override;
62
63private:
64 QString automationIdForAccessible(const QAccessibleInterface *accessible);
65 ULONG m_ref;
66 static QMutex m_mutex;
67};
68
70
71#endif // QT_CONFIG(accessibility)
72
73#endif // QWINDOWSUIAMAINPROVIDER_H
\inmodule QtCore
Definition qmutex.h:285
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
direction
Combined button and popup list for selecting options.
GLint GLint GLint GLint GLint x
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLint y
struct _cl_event * event
#define Q_OBJECT
long HRESULT
virtual HRESULT STDMETHODCALLTYPE GetRuntimeId(__RPC__deref_out_opt SAFEARRAY **runtimeId)=0
interface IRawElementProviderFragment IRawElementProviderFragment
virtual HRESULT STDMETHODCALLTYPE SetFocus()=0
interface IRawElementProviderFragmentRoot IRawElementProviderFragmentRoot
virtual HRESULT STDMETHODCALLTYPE GetPropertyValue(PROPERTYID propertyId, __RPC__out VARIANT *pRetVal)=0
virtual HRESULT STDMETHODCALLTYPE get_HostRawElementProvider(__RPC__deref_out_opt IRawElementProviderSimple **pRetVal)=0
IRawElementProviderFragment __RPC__deref_out_opt IRawElementProviderFragment ** pRetVal
virtual HRESULT STDMETHODCALLTYPE GetPatternProvider(PATTERNID patternId, __RPC__deref_out_opt IUnknown **pRetVal)=0
virtual HRESULT STDMETHODCALLTYPE get_BoundingRectangle(__RPC__out struct UiaRect *pRetVal)=0
virtual HRESULT STDMETHODCALLTYPE GetEmbeddedFragmentRoots(__RPC__deref_out_opt SAFEARRAY **pRetVal)=0
virtual HRESULT STDMETHODCALLTYPE GetFocus(__RPC__deref_out_opt IRawElementProviderFragment **pRetVal)=0
virtual HRESULT STDMETHODCALLTYPE get_FragmentRoot(__RPC__deref_out_opt IRawElementProviderFragmentRoot **pRetVal)=0
int PATTERNID
Definition uiatypes_p.h:19
ProviderOptions
Definition uiatypes_p.h:36
int PROPERTYID
Definition uiatypes_p.h:18
NavigateDirection
Definition uiatypes_p.h:28