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
qwindowsintegration.h
Go to the documentation of this file.
1// Copyright (C) 2013 Samuel Gaist <samuel.gaist@edeltech.ch>
2// Copyright (C) 2016 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4// Qt-Security score:significant reason:default
5
6#ifndef QWINDOWSINTEGRATION_H
7#define QWINDOWSINTEGRATION_H
8
10
11#include <qpa/qplatformintegration.h>
12#include <QtCore/qscopedpointer.h>
13#include <QtGui/private/qwindowsfontdatabase_p.h>
14#ifndef QT_NO_OPENGL
15#include <QtGui/private/qopenglcontext_p.h>
16#endif
17#include <qpa/qplatformopenglcontext.h>
18
20
23class QWindowsWindow;
25
27#ifndef QT_NO_OPENGL
29#endif
30 , public QWindowsApplication
31{
33public:
34 enum Options { // Options to be passed on command line.
40 DontPassOsMouseEventsSynthesizedFromTouch = 0x20, // Do not pass OS-generated mouse events from touch.
41 // Keep in sync with QWindowsFontDatabase::FontOptions
47 RtlEnabled = 0x0800,
49 };
50
51 explicit QWindowsIntegration(const QStringList &paramList);
53
54 bool hasCapability(QPlatformIntegration::Capability cap) const override;
55
56 QPlatformWindow *createPlatformWindow(QWindow *window) const override;
57 QPlatformWindow *createForeignWindow(QWindow *window, WId nativeHandle) const override;
58#ifndef QT_NO_OPENGL
59 QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
62
63 HMODULE openGLModuleHandle() const override;
64 QOpenGLContext *createOpenGLContext(HGLRC context, HWND window,
65 QOpenGLContext *shareContext) const override;
66#endif
68 void initialize() override;
69#if QT_CONFIG(clipboard)
71# if QT_CONFIG(draganddrop)
73# endif
74#endif // !QT_NO_CLIPBOARD
75 QPlatformInputContext *inputContext() const override;
76#if QT_CONFIG(accessibility)
78#endif
79 QPlatformFontDatabase *fontDatabase() const override;
80 QStringList themeNames() const override;
81 QPlatformTheme *createPlatformTheme(const QString &name) const override;
82 QPlatformServices *services() const override;
83 QVariant styleHint(StyleHint hint) const override;
84
85 QPlatformKeyMapper *keyMapper() const override;
86
87 static QWindowsIntegration *instance() { return m_instance; }
88
89 unsigned options() const;
90
91 void beep() const override;
92
93 void setApplicationBadge(qint64 number) override;
94 void setApplicationBadge(const QImage &image);
96
97#if QT_CONFIG(sessionmanager)
99#endif
100
101#if QT_CONFIG(vulkan)
103#endif
104
105protected:
106 virtual QWindowsWindow *createPlatformWindowHelper(QWindow *window, const QWindowsWindowData &) const;
107
108private:
109 QScopedPointer<QWindowsIntegrationPrivate> d;
110
111 static QWindowsIntegration *m_instance;
112
113 qint64 m_applicationBadgeNumber = 0;
114};
115
116QT_END_NAMESPACE
117
118#endif
QPlatformBackingStore * createPlatformBackingStore(QWindow *window) const override
Factory function for QPlatformBackingStore.
QWindowsGdiIntegration(const QStringList &paramList)
QPlatformNativeInterface * nativeInterface() const override
QPlatformPixmap * createPlatformPixmap(QPlatformPixmap::PixelType type) const override
Factory function for QPlatformPixmap.
\title Qt platform plugin for Windows
Definition main.cpp:59
QStringList themeNames() const override
QPlatformKeyMapper * keyMapper() const override
Accessor for the platform integration's key mapper.
QPlatformWindow * createPlatformWindow(QWindow *window) const override
Factory function for QPlatformWindow.
static QWindowsStaticOpenGLContext * staticOpenGLContext()
void setApplicationBadge(const QImage &image)
virtual QWindowsWindow * createPlatformWindowHelper(QWindow *window, const QWindowsWindowData &) const
QOpenGLContext * createOpenGLContext(HGLRC context, HWND window, QOpenGLContext *shareContext) const override
QWindowsIntegration(const QStringList &paramList)
QAbstractEventDispatcher * createEventDispatcher() const override
Factory function for the GUI event dispatcher.
QPlatformTheme * createPlatformTheme(const QString &name) const override
bool hasCapability(QPlatformIntegration::Capability cap) const override
QOpenGLContext::OpenGLModuleType openGLModuleType() override
Platform integration function for querying the OpenGL implementation type.
QPlatformFontDatabase * fontDatabase() const override
Accessor for the platform integration's fontdatabase.
QPlatformWindow * createForeignWindow(QWindow *window, WId nativeHandle) const override
void initialize() override
Performs initialization steps that depend on having an event dispatcher available.
void setApplicationBadge(qint64 number) override
static QWindowsIntegration * instance()
HMODULE openGLModuleHandle() const override
void beep() const override
QPlatformInputContext * inputContext() const override
Returns the platforms input context.
QPlatformServices * services() const override
QVariant styleHint(StyleHint hint) const override
QPlatformOpenGLContext * createPlatformOpenGLContext(QOpenGLContext *context) const override
Factory function for QPlatformOpenGLContext.
Raster or OpenGL Window.
Combined button and popup list for selecting options.