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
4#ifndef QWINDOWSUIAUTOMATION_H
5#define QWINDOWSUIAUTOMATION_H
6
7#include <QtGui/qtguiglobal.h>
8#if QT_CONFIG(accessibility)
9
10#include <uiautomation.h>
11
12#ifndef Q_CC_MSVC
13// MinGW's headers were missing these, but have since added an incomplete set
14// of the constants and structures from the .idl file. Fortunately, their IDL
15// processor generates #define's for the constants, so we can check if they are
16// present.
17
18#ifndef UIA_IsReadOnlyAttributeId
19#define UIA_IsReadOnlyAttributeId 40015
20#endif
21#ifndef UIA_StrikethroughStyleAttributeId
22#define UIA_StrikethroughStyleAttributeId 40026
23#endif
24#ifndef UIA_StyleIdAttributeId
25#define UIA_StyleIdAttributeId 40034
26#endif
27#ifndef UIA_CaretPositionAttributeId
28#define UIA_CaretPositionAttributeId 40038
29#endif
30
31#ifndef StyleId_Heading1
32#define StyleId_Heading1 70001
33#endif
34#ifndef StyleId_Heading2
35#define StyleId_Heading2 70002
36#endif
37#ifndef StyleId_Heading3
38#define StyleId_Heading3 70003
39#endif
40#ifndef StyleId_Heading4
41#define StyleId_Heading4 70004
42#endif
43#ifndef StyleId_Heading5
44#define StyleId_Heading5 70005
45#endif
46#ifndef StyleId_Heading6
47#define StyleId_Heading6 70006
48#endif
49#ifndef StyleId_Heading7
50#define StyleId_Heading7 70007
51#endif
52#ifndef StyleId_Heading8
53#define StyleId_Heading8 70008
54#endif
55#ifndef StyleId_Heading9
56#define StyleId_Heading9 70009
57#endif
58
59#if !defined(UIA_SelectionPattern2Id)
60#define UIA_SelectionPattern2Id 10034
61
62// Unfortunately, there's no way to detect the definition of enums, so we are
63// guessing their presence from a constant that is also missing.
64
65enum CaretPosition {
66 CaretPosition_Unknown = 0,
67 CaretPosition_EndOfLine = 1,
68 CaretPosition_BeginningOfLine = 2
69};
70
71enum TextDecorationLineStyle {
72 TextDecorationLineStyle_None = 0,
73 TextDecorationLineStyle_Single = 1,
74 TextDecorationLineStyle_WordsOnly = 2,
75 TextDecorationLineStyle_Double = 3,
76 TextDecorationLineStyle_Dot = 4,
77 TextDecorationLineStyle_Dash = 5,
78 TextDecorationLineStyle_DashDot = 6,
79 TextDecorationLineStyle_DashDotDot = 7,
80 TextDecorationLineStyle_Wavy = 8,
81 TextDecorationLineStyle_ThickSingle = 9,
82 TextDecorationLineStyle_DoubleWavy = 11,
83 TextDecorationLineStyle_ThickWavy = 12,
84 TextDecorationLineStyle_LongDash = 13,
85 TextDecorationLineStyle_ThickDash = 14,
86 TextDecorationLineStyle_ThickDashDot = 15,
87 TextDecorationLineStyle_ThickDashDotDot = 16,
88 TextDecorationLineStyle_ThickDot = 17,
89 TextDecorationLineStyle_ThickLongDash = 18,
90 TextDecorationLineStyle_Other = -1
91};
92#endif // UIA_SelectionPattern2Id
93
94BOOL WINAPI UiaClientsAreListening();
95
96#ifndef __ISelectionProvider2_INTERFACE_DEFINED__
97#define __ISelectionProvider2_INTERFACE_DEFINED__
98DEFINE_GUID(IID_ISelectionProvider2, 0x14f68475, 0xee1c, 0x44f6, 0xa8, 0x69, 0xd2, 0x39, 0x38, 0x1f, 0x0f, 0xe7);
99MIDL_INTERFACE("14f68475-ee1c-44f6-a869-d239381f0fe7")
100ISelectionProvider2 : public ISelectionProvider
101{
102public:
103 virtual HRESULT STDMETHODCALLTYPE get_FirstSelectedItem(__RPC__deref_out_opt IRawElementProviderSimple **retVal) = 0;
104 virtual HRESULT STDMETHODCALLTYPE get_LastSelectedItem(__RPC__deref_out_opt IRawElementProviderSimple **retVal) = 0;
105 virtual HRESULT STDMETHODCALLTYPE get_CurrentSelectedItem(__RPC__deref_out_opt IRawElementProviderSimple **retVal) = 0;
106 virtual HRESULT STDMETHODCALLTYPE get_ItemCount(__RPC__out int *retVal) = 0;
107};
108#ifdef __CRT_UUID_DECL
109__CRT_UUID_DECL(ISelectionProvider2, 0x14f68475, 0xee1c, 0x44f6, 0xa8, 0x69, 0xd2, 0x39, 0x38, 0x1f, 0x0f, 0xe7)
110#endif
111#endif // __ISelectionProvider2_INTERFACE_DEFINED__
112
113#endif // !Q_CC_MSVC
114
115#endif // QT_CONFIG(accessibility)
116
117#endif // QWINDOWSUIAUTOMATION_H