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
qqnxintegration.h
Go to the documentation of this file.
1// Copyright (C) 2011 - 2013 BlackBerry Limited. All rights reserved.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QQNXINTEGRATION_H
6#define QQNXINTEGRATION_H
7
8#include <qpa/qplatformintegration.h>
9#include <private/qtguiglobal_p.h>
10#include <QtCore/qhash.h>
11#include <QtCore/qmutex.h>
12
13#include <screen/screen.h>
14
15#if QT_CONFIG(opengl)
16#include <EGL/egl.h>
17#endif
18
20
21class QQnxScreenEventThread;
22class QQnxFileDialogHelper;
24class QQnxWindow;
25class QQnxScreen;
29class QQnxAbstractVirtualKeyboard;
30class QQnxServices;
31
32class QSimpleDrag;
34
35#if QT_CONFIG(qqnx_pps)
36class QQnxNavigatorEventNotifier;
37class QQnxButtonEventNotifier;
38#endif
39
40#if !defined(QT_NO_CLIPBOARD)
41class QQnxClipboard;
42#endif
43
44using QQnxWindowMapper = QHash<screen_window_t, QWindow *>;
45
47{
48public:
49 enum Option { // Options to be passed on command line.
50 NoOptions = 0x0,
55 Desktop = 0x10
56 };
57 Q_DECLARE_FLAGS(Options, Option)
58 explicit QQnxIntegration(const QStringList &paramList);
60
61 static QQnxIntegration *instance() { return ms_instance; }
62
63 bool hasCapability(QPlatformIntegration::Capability cap) const override;
64
65 QPlatformWindow *createForeignWindow(QWindow *window, WId nativeHandle) const override;
66 QPlatformWindow *createPlatformWindow(QWindow *window) const override;
67 QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const override;
68
69#if QT_CONFIG(opengl)
70 EGLDisplay eglDisplay() const { return m_eglDisplay; }
72#endif
73
74#if QT_CONFIG(vulkan)
76#endif
77
78 QPlatformInputContext *inputContext() const override;
79
80 void moveToScreen(QWindow *window, int screen);
81
82 bool supportsNavigatorEvents() const;
83
85
86 QPlatformFontDatabase *fontDatabase() const override { return m_fontDatabase; }
87
89
90#if !defined(QT_NO_CLIPBOARD)
91 QPlatformClipboard *clipboard() const override;
92#endif
93#if QT_CONFIG(draganddrop)
95#endif
96 QVariant styleHint(StyleHint hint) const override;
97
98 QStringList themeNames() const override;
99 QPlatformTheme *createPlatformTheme(const QString &name) const override;
100
101 QPlatformServices *services() const override;
102
103 QWindow *window(screen_window_t qnxWindow) const;
104
105 QQnxScreen *screenForNative(screen_display_t qnxScreen) const;
106
107 void createDisplay(screen_display_t display, bool isPrimary);
108 void removeDisplay(QQnxScreen *screen);
109 QQnxScreen *primaryDisplay() const;
110 Options options() const;
113
115
116 const QList<QQnxScreen *> &screens() const { return m_screens; }
117
118private:
119 void createDisplays();
120 void destroyDisplays();
121
122 void addWindow(screen_window_t qnxWindow, QWindow *window);
123 void removeWindow(screen_window_t qnxWindow);
124 QList<screen_display_t *> sortDisplays(screen_display_t *displays,
125 int displayCount);
126
127 screen_context_t m_screenContext;
128 QByteArray m_screenContextId;
129 QQnxScreenEventThread *m_screenEventThread;
130 QQnxNavigatorEventHandler *m_navigatorEventHandler;
131 QQnxAbstractVirtualKeyboard *m_virtualKeyboard;
132 QQnxInputContext *m_inputContext;
133#if QT_CONFIG(qqnx_pps)
136#endif
137 QPlatformInputContext *m_qpaInputContext;
138 mutable QQnxServices *m_services = nullptr;
139 QPlatformFontDatabase *m_fontDatabase;
140 mutable QAbstractEventDispatcher *m_eventDispatcher;
141 QQnxNativeInterface *m_nativeInterface;
142 QList<QQnxScreen*> m_screens;
143 QQnxScreenEventHandler *m_screenEventHandler;
144#if !defined(QT_NO_CLIPBOARD)
145 mutable QQnxClipboard* m_clipboard;
146#endif
147 QQnxAbstractNavigator *m_navigator;
148#if QT_CONFIG(draganddrop)
150#endif
151 QQnxWindowMapper m_windowMapper;
152 mutable QMutex m_windowMapperMutex;
153
154 Options m_options;
155
156#if QT_CONFIG(opengl)
158 void createEglDisplay();
159 void destroyEglDisplay();
160#endif
161
162 static QQnxIntegration *ms_instance;
163
164 friend class QQnxWindow;
165};
166
167QT_END_NAMESPACE
168
169#endif // QQNXINTEGRATION_H
QAbstractEventDispatcher * createEventDispatcher() const override
Factory function for the GUI event dispatcher.
bool hasCapability(QPlatformIntegration::Capability cap) const override
QPlatformFontDatabase * fontDatabase() const override
Accessor for the platform integration's fontdatabase.
QPlatformNativeInterface * nativeInterface() const override
QQnxNavigatorEventHandler * navigatorEventHandler()
QPlatformBackingStore * createPlatformBackingStore(QWindow *window) const override
Factory function for QPlatformBackingStore.
QPlatformWindow * createPlatformWindow(QWindow *window) const override
Factory function for QPlatformWindow.
static QQnxIntegration * instance()
const QList< QQnxScreen * > & screens() const
QPlatformWindow * createForeignWindow(QWindow *window, WId nativeHandle) const override
QStringList themeNames() const override
Options options() const
QQnxScreen * primaryDisplay() const
QPlatformTheme * createPlatformTheme(const QString &name) const override
void removeDisplay(QQnxScreen *screen)
QVariant styleHint(StyleHint hint) const override
QPlatformServices * services() const override
void moveToScreen(QWindow *window, int screen)
QPlatformInputContext * inputContext() const override
Returns the platforms input context.
QByteArray screenContextId()
QQnxScreen * screenForNative(screen_display_t qnxScreen) const
void createDisplay(screen_display_t display, bool isPrimary)
screen_context_t screenContext()
QWindow * window(screen_window_t qnxWindow) const
QPlatformClipboard * clipboard() const override
Accessor for the platform integration's clipboard.
bool supportsNavigatorEvents() const
The QQnxWindow is the base class of the various classes used as instances of QPlatformWindow in the Q...
Definition qqnxwindow.h:32
Combined button and popup list for selecting options.
QT_BEGIN_NAMESPACE void qqnxLgmonInit()
Definition qqnxlgmon.h:35