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
qiosintegration.h
Go to the documentation of this file.
1// Copyright (C) 2016 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
4#ifndef QPLATFORMINTEGRATION_UIKIT_H
5#define QPLATFORMINTEGRATION_UIKIT_H
6
7#include <qpa/qplatformintegration.h>
8#include <qpa/qplatformnativeinterface.h>
9#include <qpa/qwindowsysteminterface.h>
10
11#include <QtCore/private/qfactoryloader_p.h>
12
14
15#if !defined(Q_OS_TVOS) && !defined(Q_OS_VISIONOS)
17#endif
18
19#if defined(Q_OS_VISIONOS)
20#include <swift/bridging>
21#endif
22
24
25using namespace QNativeInterface;
26
27class QIOSServices;
28
29class
30#if defined(Q_OS_VISIONOS)
31 SWIFT_IMMORTAL_REFERENCE
32#endif
34#if defined(Q_OS_VISIONOS)
35 , public QVisionOSApplication
36#endif
37{
39public:
42
43 void initialize() override;
44
45 bool hasCapability(Capability cap) const override;
46
47 QPlatformWindow *createPlatformWindow(QWindow *window) const override;
48 QPlatformWindow *createForeignWindow(QWindow *window, WId nativeHandle) const override;
49 QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const override;
50
51#if QT_CONFIG(opengl)
52 QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
53#endif
54
55 QPlatformOffscreenSurface *createPlatformOffscreenSurface(QOffscreenSurface *surface) const override;
56
57 QPlatformFontDatabase *fontDatabase() const override;
58
59#if QT_CONFIG(clipboard)
60 QPlatformClipboard *clipboard() const override;
61#endif
62
63 QPlatformInputContext *inputContext() const override;
64 QPlatformServices *services() const override;
65
66 QVariant styleHint(StyleHint hint) const override;
67
68 QStringList themeNames() const override;
69 QPlatformTheme *createPlatformTheme(const QString &name) const override;
70
71 QAbstractEventDispatcher *createEventDispatcher() const override;
72 QPlatformNativeInterface *nativeInterface() const override;
73
74 QPointingDevice *touchDevice();
75#if QT_CONFIG(accessibility)
76 QPlatformAccessibility *accessibility() const override;
77#endif
78
79 void beep() const override;
80
81 void setApplicationBadge(qint64 number) override;
82
83 static QIOSIntegration *instance();
84
85 // -- QPlatformNativeInterface --
86
87 void *nativeResourceForWindow(const QByteArray &resource, QWindow *window) override;
88
89 QFactoryLoader *optionalPlugins() { return m_optionalPlugins; }
90
92
93#if defined(Q_OS_VISIONOS)
94 void openImmersiveSpace() override;
95 void dismissImmersiveSpace() override;
96
97 using CompositorLayer = QVisionOSApplication::ImmersiveSpaceCompositorLayer;
98 void setImmersiveSpaceCompositorLayer(CompositorLayer *layer) override;
99
100 void configureCompositorLayer(cp_layer_renderer_capabilities_t, cp_layer_renderer_configuration_t);
101 void renderCompositorLayer(cp_layer_renderer_t);
102#endif
103
104private:
105 QPlatformFontDatabase *m_fontDatabase;
106#if QT_CONFIG(clipboard)
107 QPlatformClipboard *m_clipboard;
108#endif
109 QPlatformInputContext *m_inputContext;
110 QPointingDevice *m_touchDevice;
111 QIOSServices *m_platformServices;
112 mutable QPlatformAccessibility *m_accessibility;
113 QFactoryLoader *m_optionalPlugins;
114#if !defined(Q_OS_TVOS) && !defined(Q_OS_VISIONOS)
115 QIOSTextInputOverlay m_textInputOverlay;
116#endif
117
118#if defined(Q_OS_VISIONOS)
119 CompositorLayer *m_immersiveSpaceCompositorLayer = nullptr;
120#endif
121};
122
124
125#endif
std::vector< ObjCStrongReference< CBMutableService > > services
\inmodule QtCore
Definition qbytearray.h:57
QIOSApplicationState applicationState
QFactoryLoader * optionalPlugins()
\inmodule QtGui
\inmodule QtGui
The QPlatformBackingStore class provides the drawing area for top-level windows.
The QPlatformClipboard class provides an abstraction for the system clipboard.
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.
Capability
Capabilities are used to determine specific features of a platform integration.
The QPlatformNativeInterface class provides an abstraction for retrieving native resource handles.
The QPlatformOpenGLContext class provides an abstraction for native GL contexts.
The QPlatformServices provides the backend for desktop-related functionality.
virtual bool hasCapability(Capability capability) const
The QPlatformTheme class allows customizing the UI based on themes.
The QPlatformWindow class provides an abstraction for top-level windows.
The QPointingDevice class describes a device from which mouse, touch or tablet events originate.
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qvariant.h:65
\inmodule QtGui
Definition qwindow.h:63
Combined button and popup list for selecting options.
static void * context
static bool initialize()
Definition qctf.cpp:94
EGLOutputLayerEXT layer
GLuint name
GLenum cap
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
#define Q_OBJECT
long long qint64
Definition qtypes.h:60
QT_BEGIN_NAMESPACE constexpr const wchar_t * themeNames[]
aWidget window() -> setWindowTitle("New Window Title")
[2]