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
5#ifndef QWINDOWSINTEGRATION_H
6#define QWINDOWSINTEGRATION_H
7
9
10#include <qpa/qplatformintegration.h>
11#include <QtCore/qscopedpointer.h>
12#include <QtGui/private/qwindowsfontdatabase_p.h>
13#ifndef QT_NO_OPENGL
14#include <QtGui/private/qopenglcontext_p.h>
15#endif
16#include <qpa/qplatformopenglcontext.h>
17
19
22class QWindowsWindow;
24
26#ifndef QT_NO_OPENGL
28#endif
29 , public QWindowsApplication
30{
32public:
33 enum Options { // Options to be passed on command line.
39 DontPassOsMouseEventsSynthesizedFromTouch = 0x20, // Do not pass OS-generated mouse events from touch.
40 // Keep in sync with QWindowsFontDatabase::FontOptions
46 RtlEnabled = 0x0800,
48 };
49
50 explicit QWindowsIntegration(const QStringList &paramList);
52
53 bool hasCapability(QPlatformIntegration::Capability cap) const override;
54
55 QPlatformWindow *createPlatformWindow(QWindow *window) const override;
56 QPlatformWindow *createForeignWindow(QWindow *window, WId nativeHandle) const override;
57#ifndef QT_NO_OPENGL
58 QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
61
62 HMODULE openGLModuleHandle() const override;
63 QOpenGLContext *createOpenGLContext(HGLRC context, HWND window,
64 QOpenGLContext *shareContext) const override;
65#endif
67 void initialize() override;
68#if QT_CONFIG(clipboard)
70# if QT_CONFIG(draganddrop)
72# endif
73#endif // !QT_NO_CLIPBOARD
74 QPlatformInputContext *inputContext() const override;
75#if QT_CONFIG(accessibility)
77#endif
78 QPlatformFontDatabase *fontDatabase() const override;
79 QStringList themeNames() const override;
80 QPlatformTheme *createPlatformTheme(const QString &name) const override;
81 QPlatformServices *services() const override;
82 QVariant styleHint(StyleHint hint) const override;
83
84 QPlatformKeyMapper *keyMapper() const override;
85
86 static QWindowsIntegration *instance() { return m_instance; }
87
88 unsigned options() const;
89
90 void beep() const override;
91
92 void setApplicationBadge(qint64 number) override;
93 void setApplicationBadge(const QImage &image);
95
96#if QT_CONFIG(sessionmanager)
98#endif
99
100#if QT_CONFIG(vulkan)
102#endif
103
104protected:
105 virtual QWindowsWindow *createPlatformWindowHelper(QWindow *window, const QWindowsWindowData &) const;
106
107private:
108 QScopedPointer<QWindowsIntegrationPrivate> d;
109
110 static QWindowsIntegration *m_instance;
111
112 qint64 m_applicationBadgeNumber = 0;
113};
114
115QT_END_NAMESPACE
116
117#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:58
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.