Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwindowsuiautomation.h
Go to the documentation of this file.
1// Copyright (C) 2024 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// Qt-Security score:significant reason:default
4
5#ifndef QWINDOWSUIAUTOMATION_H
6#define QWINDOWSUIAUTOMATION_H
7
8#include <QtGui/qtguiglobal.h>
9#if QT_CONFIG(accessibility)
10
11#include <uiautomation.h>
12
13#ifndef Q_CC_MSVC
14// MinGW's headers were missing these, but have since added an incomplete set
15// of the constants and structures from the .idl file. Fortunately, their IDL
16// processor generates #define's for the constants, so we can check if they are
17// present.
18
19#ifndef UIA_IsReadOnlyAttributeId
20#define UIA_IsReadOnlyAttributeId 40015
21#endif
22#ifndef UIA_StrikethroughStyleAttributeId
23#define UIA_StrikethroughStyleAttributeId 40026
24#endif
25#ifndef UIA_StyleIdAttributeId
26#define UIA_StyleIdAttributeId 40034
27#endif
28#ifndef UIA_CaretPositionAttributeId
29#define UIA_CaretPositionAttributeId 40038
30#endif
31
32#ifndef StyleId_Heading1
33#define StyleId_Heading1 70001
34#endif
35#ifndef StyleId_Heading2
36#define StyleId_Heading2 70002
37#endif
38#ifndef StyleId_Heading3
39#define StyleId_Heading3 70003
40#endif
41#ifndef StyleId_Heading4
42#define StyleId_Heading4 70004
43#endif
44#ifndef StyleId_Heading5
45#define StyleId_Heading5 70005
46#endif
47#ifndef StyleId_Heading6
48#define StyleId_Heading6 70006
49#endif
50#ifndef StyleId_Heading7
51#define StyleId_Heading7 70007
52#endif
53#ifndef StyleId_Heading8
54#define StyleId_Heading8 70008
55#endif
56#ifndef StyleId_Heading9
57#define StyleId_Heading9 70009
58#endif
59
60#ifndef HeadingLevel_None
61#define HeadingLevel_None 80050
62#endif
63#ifndef HeadingLevel1
64#define HeadingLevel1 80051
65#endif
66#ifndef HeadingLevel2
67#define HeadingLevel2 80052
68#endif
69#ifndef HeadingLevel3
70#define HeadingLevel3 80053
71#endif
72#ifndef HeadingLevel4
73#define HeadingLevel4 80054
74#endif
75#ifndef HeadingLevel5
76#define HeadingLevel5 80055
77#endif
78#ifndef HeadingLevel6
79#define HeadingLevel6 80056
80#endif
81#ifndef HeadingLevel7
82#define HeadingLevel7 80057
83#endif
84#ifndef HeadingLevel8
85#define HeadingLevel8 80058
86#endif
87#ifndef HeadingLevel9
88#define HeadingLevel9 80059
89#endif
90
91#if !defined(UIA_SelectionPattern2Id)
92#define UIA_SelectionPattern2Id 10034
93
94// Unfortunately, there's no way to detect the definition of enums, so we are
95// guessing their presence from a constant that is also missing.
96
97enum CaretPosition {
98 CaretPosition_Unknown = 0,
99 CaretPosition_EndOfLine = 1,
100 CaretPosition_BeginningOfLine = 2
101};
102
103enum TextDecorationLineStyle {
104 TextDecorationLineStyle_None = 0,
105 TextDecorationLineStyle_Single = 1,
106 TextDecorationLineStyle_WordsOnly = 2,
107 TextDecorationLineStyle_Double = 3,
108 TextDecorationLineStyle_Dot = 4,
109 TextDecorationLineStyle_Dash = 5,
110 TextDecorationLineStyle_DashDot = 6,
111 TextDecorationLineStyle_DashDotDot = 7,
112 TextDecorationLineStyle_Wavy = 8,
113 TextDecorationLineStyle_ThickSingle = 9,
114 TextDecorationLineStyle_DoubleWavy = 11,
115 TextDecorationLineStyle_ThickWavy = 12,
116 TextDecorationLineStyle_LongDash = 13,
117 TextDecorationLineStyle_ThickDash = 14,
118 TextDecorationLineStyle_ThickDashDot = 15,
119 TextDecorationLineStyle_ThickDashDotDot = 16,
120 TextDecorationLineStyle_ThickDot = 17,
121 TextDecorationLineStyle_ThickLongDash = 18,
122 TextDecorationLineStyle_Other = -1
123};
124#endif // UIA_SelectionPattern2Id
125
126BOOL WINAPI UiaClientsAreListening();
127
128#ifndef __ISelectionProvider2_INTERFACE_DEFINED__
129#define __ISelectionProvider2_INTERFACE_DEFINED__
130DEFINE_GUID(IID_ISelectionProvider2, 0x14f68475, 0xee1c, 0x44f6, 0xa8, 0x69, 0xd2, 0x39, 0x38, 0x1f, 0x0f, 0xe7);
131MIDL_INTERFACE("14f68475-ee1c-44f6-a869-d239381f0fe7")
132ISelectionProvider2 : public ISelectionProvider
133{
134public:
135 virtual HRESULT STDMETHODCALLTYPE get_FirstSelectedItem(__RPC__deref_out_opt IRawElementProviderSimple **retVal) = 0;
136 virtual HRESULT STDMETHODCALLTYPE get_LastSelectedItem(__RPC__deref_out_opt IRawElementProviderSimple **retVal) = 0;
137 virtual HRESULT STDMETHODCALLTYPE get_CurrentSelectedItem(__RPC__deref_out_opt IRawElementProviderSimple **retVal) = 0;
138 virtual HRESULT STDMETHODCALLTYPE get_ItemCount(__RPC__out int *retVal) = 0;
139};
140#ifdef __CRT_UUID_DECL
141__CRT_UUID_DECL(ISelectionProvider2, 0x14f68475, 0xee1c, 0x44f6, 0xa8, 0x69, 0xd2, 0x39, 0x38, 0x1f, 0x0f, 0xe7)
142#endif
143#endif // __ISelectionProvider2_INTERFACE_DEFINED__
144
145#endif // !Q_CC_MSVC
146
147#endif // QT_CONFIG(accessibility)
148
149#endif // QWINDOWSUIAUTOMATION_H