Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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 QComObject<IRawElementProviderSimple, IRawElementProviderFragment, IRawElementProviderFragmentRoot>
24{
26 Q_DISABLE_COPY_MOVE(QWindowsUiaMainProvider)
27public:
28 static QWindowsUiaMainProvider *providerForAccessible(QAccessibleInterface *accessible);
29 explicit QWindowsUiaMainProvider(QAccessibleInterface *a);
30 virtual ~QWindowsUiaMainProvider();
31 static void notifyFocusChange(QAccessibleEvent *event);
32 static void notifyStateChange(QAccessibleStateChangeEvent *event);
33 static void notifyValueChange(QAccessibleValueChangeEvent *event);
34 static void notifyNameChange(QAccessibleEvent *event);
35 static void notifySelectionChange(QAccessibleEvent *event);
36 static void notifyTextChange(QAccessibleEvent *event);
37 static void raiseNotification(QAccessibleAnnouncementEvent *event);
38
39 // IUnknown
40 HRESULT STDMETHODCALLTYPE QueryInterface(REFIID id, LPVOID *iface) override;
41 ULONG STDMETHODCALLTYPE Release() override;
42
43 // IRawElementProviderSimple methods
44 HRESULT STDMETHODCALLTYPE get_ProviderOptions(ProviderOptions *pRetVal) override;
45 HRESULT STDMETHODCALLTYPE GetPatternProvider(PATTERNID idPattern, IUnknown **pRetVal) override;
46 HRESULT STDMETHODCALLTYPE GetPropertyValue(PROPERTYID idProp, VARIANT *pRetVal) override;
47 HRESULT STDMETHODCALLTYPE get_HostRawElementProvider(IRawElementProviderSimple **pRetVal) override;
48
49 // IRawElementProviderFragment methods
50 HRESULT STDMETHODCALLTYPE Navigate(NavigateDirection direction, IRawElementProviderFragment **pRetVal) override;
51 HRESULT STDMETHODCALLTYPE GetRuntimeId(SAFEARRAY **pRetVal) override;
52 HRESULT STDMETHODCALLTYPE get_BoundingRectangle(UiaRect *pRetVal) override;
53 HRESULT STDMETHODCALLTYPE GetEmbeddedFragmentRoots(SAFEARRAY **pRetVal) override;
54 HRESULT STDMETHODCALLTYPE SetFocus() override;
55 HRESULT STDMETHODCALLTYPE get_FragmentRoot(IRawElementProviderFragmentRoot **pRetVal) override;
56
57 // IRawElementProviderFragmentRoot methods
58 HRESULT STDMETHODCALLTYPE ElementProviderFromPoint(double x, double y, IRawElementProviderFragment **pRetVal) override;
59 HRESULT STDMETHODCALLTYPE GetFocus(IRawElementProviderFragment **pRetVal) override;
60
61private:
62 QString automationIdForAccessible(const QAccessibleInterface *accessible);
63 static void fillVariantArrayForRelation(QAccessibleInterface *accessible, QAccessible::Relation relation, VARIANT *pRetVal);
64 static QMutex m_mutex;
65};
66
68
69#endif // QT_CONFIG(accessibility)
70
71#endif // QWINDOWSUIAMAINPROVIDER_H
\inmodule QtCore
Definition qmutex.h:281
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
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