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#if !defined(UIA_SelectionPattern2Id)
61#define UIA_SelectionPattern2Id 10034
62
63// Unfortunately, there's no way to detect the definition of enums, so we are
64// guessing their presence from a constant that is also missing.
65
66enum CaretPosition {
67 CaretPosition_Unknown = 0,
68 CaretPosition_EndOfLine = 1,
69 CaretPosition_BeginningOfLine = 2
70};
71
72enum TextDecorationLineStyle {
73 TextDecorationLineStyle_None = 0,
74 TextDecorationLineStyle_Single = 1,
75 TextDecorationLineStyle_WordsOnly = 2,
76 TextDecorationLineStyle_Double = 3,
77 TextDecorationLineStyle_Dot = 4,
78 TextDecorationLineStyle_Dash = 5,
79 TextDecorationLineStyle_DashDot = 6,
80 TextDecorationLineStyle_DashDotDot = 7,
81 TextDecorationLineStyle_Wavy = 8,
82 TextDecorationLineStyle_ThickSingle = 9,
83 TextDecorationLineStyle_DoubleWavy = 11,
84 TextDecorationLineStyle_ThickWavy = 12,
85 TextDecorationLineStyle_LongDash = 13,
86 TextDecorationLineStyle_ThickDash = 14,
87 TextDecorationLineStyle_ThickDashDot = 15,
88 TextDecorationLineStyle_ThickDashDotDot = 16,
89 TextDecorationLineStyle_ThickDot = 17,
90 TextDecorationLineStyle_ThickLongDash = 18,
91 TextDecorationLineStyle_Other = -1
92};
93#endif // UIA_SelectionPattern2Id
94
95BOOL WINAPI UiaClientsAreListening();
96
97#ifndef __ISelectionProvider2_INTERFACE_DEFINED__
98#define __ISelectionProvider2_INTERFACE_DEFINED__
99DEFINE_GUID(IID_ISelectionProvider2, 0x14f68475, 0xee1c, 0x44f6, 0xa8, 0x69, 0xd2, 0x39, 0x38, 0x1f, 0x0f, 0xe7);
100MIDL_INTERFACE("14f68475-ee1c-44f6-a869-d239381f0fe7")
101ISelectionProvider2 : public ISelectionProvider
102{
103public:
104 virtual HRESULT STDMETHODCALLTYPE get_FirstSelectedItem(__RPC__deref_out_opt IRawElementProviderSimple **retVal) = 0;
105 virtual HRESULT STDMETHODCALLTYPE get_LastSelectedItem(__RPC__deref_out_opt IRawElementProviderSimple **retVal) = 0;
106 virtual HRESULT STDMETHODCALLTYPE get_CurrentSelectedItem(__RPC__deref_out_opt IRawElementProviderSimple **retVal) = 0;
107 virtual HRESULT STDMETHODCALLTYPE get_ItemCount(__RPC__out int *retVal) = 0;
108};
109#ifdef __CRT_UUID_DECL
110__CRT_UUID_DECL(ISelectionProvider2, 0x14f68475, 0xee1c, 0x44f6, 0xa8, 0x69, 0xd2, 0x39, 0x38, 0x1f, 0x0f, 0xe7)
111#endif
112#endif // __ISelectionProvider2_INTERFACE_DEFINED__
113
114#endif // !Q_CC_MSVC
115
116#endif // QT_CONFIG(accessibility)
117
118#endif // QWINDOWSUIAUTOMATION_H