Warning: That file was not part of the compilation database. It may have many parsing errors.

1/****************************************************************************
2**
3** Copyright (C) 2013 Samuel Gaist <samuel.gaist@edeltech.ch>
4** Copyright (C) 2016 The Qt Company Ltd.
5** Contact: https://www.qt.io/licensing/
6**
7** This file is part of the plugins of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:LGPL$
10** Commercial License Usage
11** Licensees holding valid commercial Qt licenses may use this file in
12** accordance with the commercial license agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in
14** a written agreement between you and The Qt Company. For licensing terms
15** and conditions see https://www.qt.io/terms-conditions. For further
16** information use the contact form at https://www.qt.io/contact-us.
17**
18** GNU Lesser General Public License Usage
19** Alternatively, this file may be used under the terms of the GNU Lesser
20** General Public License version 3 as published by the Free Software
21** Foundation and appearing in the file LICENSE.LGPL3 included in the
22** packaging of this file. Please review the following information to
23** ensure the GNU Lesser General Public License version 3 requirements
24** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
25**
26** GNU General Public License Usage
27** Alternatively, this file may be used under the terms of the GNU
28** General Public License version 2.0 or (at your option) the GNU General
29** Public license version 3 or any later version approved by the KDE Free
30** Qt Foundation. The licenses are as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
32** included in the packaging of this file. Please review the following
33** information to ensure the GNU General Public License requirements will
34** be met: https://www.gnu.org/licenses/gpl-2.0.html and
35** https://www.gnu.org/licenses/gpl-3.0.html.
36**
37** $QT_END_LICENSE$
38**
39****************************************************************************/
40
41#ifndef QWINDOWSINTEGRATION_H
42#define QWINDOWSINTEGRATION_H
43
44#include <qpa/qplatformintegration.h>
45#include <QtCore/qscopedpointer.h>
46#include <QtFontDatabaseSupport/private/qwindowsfontdatabase_p.h>
47
48QT_BEGIN_NAMESPACE
49
50struct QWindowsIntegrationPrivate;
51struct QWindowsWindowData;
52class QWindowsWindow;
53class QWindowsStaticOpenGLContext;
54
55class QWindowsIntegration : public QPlatformIntegration
56{
57 Q_DISABLE_COPY_MOVE(QWindowsIntegration)
58public:
59 enum Options { // Options to be passed on command line.
60 FontDatabaseFreeType = 0x1,
61 FontDatabaseNative = 0x2,
62 DisableArb = 0x4,
63 NoNativeDialogs = 0x8,
64 XpNativeDialogs = 0x10,
65 DontPassOsMouseEventsSynthesizedFromTouch = 0x20, // Do not pass OS-generated mouse events from touch.
66 // Keep in sync with QWindowsFontDatabase::FontOptions
67 DontUseDirectWriteFonts = QWindowsFontDatabase::DontUseDirectWriteFonts,
68 DontUseColorFonts = QWindowsFontDatabase::DontUseColorFonts,
69 AlwaysUseNativeMenus = 0x100,
70 NoNativeMenus = 0x200,
71 DontUseWMPointer = 0x400,
72 DetectAltGrModifier = 0x800,
73 RtlEnabled = 0x1000
74 };
75
76 explicit QWindowsIntegration(const QStringList &paramList);
77 ~QWindowsIntegration() override;
78
79 bool hasCapability(QPlatformIntegration::Capability cap) const override;
80
81 QPlatformWindow *createPlatformWindow(QWindow *window) const override;
82 QPlatformWindow *createForeignWindow(QWindow *window, WId nativeHandle) const override;
83#ifndef QT_NO_OPENGL
84 QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
85 QOpenGLContext::OpenGLModuleType openGLModuleType() override;
86 static QWindowsStaticOpenGLContext *staticOpenGLContext();
87#endif
88 QAbstractEventDispatcher *createEventDispatcher() const override;
89 void initialize() override;
90#if QT_CONFIG(clipboard)
91 QPlatformClipboard *clipboard() const override;
92# if QT_CONFIG(draganddrop)
93 QPlatformDrag *drag() const override;
94# endif
95#endif // !QT_NO_CLIPBOARD
96 QPlatformInputContext *inputContext() const override;
97#if QT_CONFIG(accessibility)
98 QPlatformAccessibility *accessibility() const override;
99#endif
100 QPlatformFontDatabase *fontDatabase() const override;
101 QStringList themeNames() const override;
102 QPlatformTheme *createPlatformTheme(const QString &name) const override;
103 QPlatformServices *services() const override;
104 QVariant styleHint(StyleHint hint) const override;
105
106 Qt::KeyboardModifiers queryKeyboardModifiers() const override;
107 QList<int> possibleKeys(const QKeyEvent *e) const override;
108
109 static QWindowsIntegration *instance() { return m_instance; }
110
111 unsigned options() const;
112
113 void beep() const override;
114
115#if QT_CONFIG(sessionmanager)
116 QPlatformSessionManager *createPlatformSessionManager(const QString &id, const QString &key) const override;
117#endif
118
119#if QT_CONFIG(vulkan)
120 QPlatformVulkanInstance *createPlatformVulkanInstance(QVulkanInstance *instance) const override;
121#endif
122
123protected:
124 virtual QWindowsWindow *createPlatformWindowHelper(QWindow *window, const QWindowsWindowData &) const;
125
126private:
127 QScopedPointer<QWindowsIntegrationPrivate> d;
128
129 static QWindowsIntegration *m_instance;
130};
131
132QT_END_NAMESPACE
133
134#endif
135

Warning: That file was not part of the compilation database. It may have many parsing errors.