Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
27 , public QNativeInterface::Private::QWindowsGLIntegration
28#endif
29 , public QWindowsApplication
30{
31 Q_DISABLE_COPY_MOVE(QWindowsIntegration)
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
47 RtlEnabled = 0x1000,
48 FontDatabaseGDI = 0x2000
49 };
50
51 explicit QWindowsIntegration(const QStringList &paramList);
52 ~QWindowsIntegration() override;
53
55
57 QPlatformWindow *createForeignWindow(QWindow *window, WId nativeHandle) const override;
58#ifndef QT_NO_OPENGL
62
63 HMODULE openGLModuleHandle() const override;
65 QOpenGLContext *shareContext) const override;
66#endif
68 void initialize() override;
69#if QT_CONFIG(clipboard)
70 QPlatformClipboard *clipboard() const override;
71# if QT_CONFIG(draganddrop)
72 QPlatformDrag *drag() const override;
73# endif
74#endif // !QT_NO_CLIPBOARD
75 QPlatformInputContext *inputContext() const override;
76#if QT_CONFIG(accessibility)
77 QPlatformAccessibility *accessibility() const override;
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)
102 QPlatformVulkanInstance *createPlatformVulkanInstance(QVulkanInstance *instance) const override;
103#endif
104
105protected:
107
108private:
109 QScopedPointer<QWindowsIntegrationPrivate> d;
110
111 static QWindowsIntegration *m_instance;
112
113 qint64 m_applicationBadgeNumber = 0;
114};
115
117
118#endif
\inmodule QtGui
Definition qimage.h:37
\inmodule QtGui
OpenGLModuleType
This enum defines the type of the underlying OpenGL implementation.
The QPlatformClipboard class provides an abstraction for the system clipboard.
The QPlatformDrag class provides an abstraction for drag.
The QPlatformFontDatabase class makes it possible to customize how fonts are discovered and how they ...
The QPlatformInputContext class abstracts the input method dependent data and composing state.
The QPlatformIntegration class is the entry for WindowSystem specific functionality.
virtual QPlatformSessionManager * createPlatformSessionManager(const QString &id, const QString &key) const
virtual QPlatformClipboard * clipboard() const
Accessor for the platform integration's clipboard.
Capability
Capabilities are used to determine specific features of a platform integration.
The QPlatformOpenGLContext class provides an abstraction for native GL contexts.
The QPlatformServices provides the backend for desktop-related functionality.
The QPlatformTheme class allows customizing the UI based on themes.
The QPlatformVulkanInstance class provides an abstraction for Vulkan instances.
The QPlatformWindow class provides an abstraction for top-level windows.
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qvariant.h:65
The QVulkanInstance class represents a native Vulkan instance, enabling Vulkan rendering onto a QSurf...
\inmodule QtGui
Definition qwindow.h:63
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()
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.
Definition image.cpp:4
static void * context
GLuint64 key
GLuint name
GLenum cap
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
long long qint64
Definition qtypes.h:60
HINSTANCE HMODULE
aWidget window() -> setWindowTitle("New Window Title")
[2]