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
qwindowsuiaselectionprovider.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// Qt-Security score:significant reason:default
4
5#ifndef QWINDOWSUIASELECTIONPROVIDER_H
6#define QWINDOWSUIASELECTIONPROVIDER_H
7
8#include <QtGui/qtguiglobal.h>
9#if QT_CONFIG(accessibility)
10
11#include "qwindowsuiabaseprovider.h"
12
13QT_BEGIN_NAMESPACE
14
15namespace QtPrivate {
16
17template <>
18struct QComObjectTraits<ISelectionProvider2>
19{
20 static constexpr bool isGuidOf(REFIID riid) noexcept
21 {
22 return QComObjectTraits<ISelectionProvider2, ISelectionProvider>::isGuidOf(riid);
23 }
24};
25
26} // namespace QtPrivate
27
28// Implements the Selection control pattern provider. Used for Lists.
29class QWindowsUiaSelectionProvider : public QWindowsUiaBaseProvider,
30 public QComObject<ISelectionProvider2>
31{
32 Q_DISABLE_COPY_MOVE(QWindowsUiaSelectionProvider)
33public:
34 explicit QWindowsUiaSelectionProvider(QAccessible::Id id);
35 virtual ~QWindowsUiaSelectionProvider();
36
37 // ISelectionProvider
38 HRESULT STDMETHODCALLTYPE GetSelection(SAFEARRAY **pRetVal) override;
39 HRESULT STDMETHODCALLTYPE get_CanSelectMultiple(BOOL *pRetVal) override;
40 HRESULT STDMETHODCALLTYPE get_IsSelectionRequired(BOOL *pRetVal) override;
41
42 // ISelectionProvider2
43 HRESULT STDMETHODCALLTYPE get_FirstSelectedItem(__RPC__deref_out_opt IRawElementProviderSimple **pRetVal) override;
44 HRESULT STDMETHODCALLTYPE get_LastSelectedItem(__RPC__deref_out_opt IRawElementProviderSimple **pRetVal) override;
45 HRESULT STDMETHODCALLTYPE get_CurrentSelectedItem(__RPC__deref_out_opt IRawElementProviderSimple **pRetVal) override;
46 HRESULT STDMETHODCALLTYPE get_ItemCount(__RPC__out int *pRetVal) override;
47};
48
49QT_END_NAMESPACE
50
51#endif // QT_CONFIG(accessibility)
52
53#endif // QWINDOWSUIASELECTIONPROVIDER_H