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 QPlatformServices *services() const override;
99
100 QWindow *window(screen_window_t qnxWindow) const;
101
102 QQnxScreen *screenForNative(screen_display_t qnxScreen) const;
103
104 void createDisplay(screen_display_t display, bool isPrimary);
105 void removeDisplay(QQnxScreen *screen);
106 QQnxScreen *primaryDisplay() const;
107 Options options() const;
110
112
113private:
114 void createDisplays();
115 void destroyDisplays();
116
117 void addWindow(screen_window_t qnxWindow, QWindow *window);
118 void removeWindow(screen_window_t qnxWindow);
119 QList<screen_display_t *> sortDisplays(screen_display_t *displays,
120 int displayCount);
121
122 screen_context_t m_screenContext;
123 QByteArray m_screenContextId;
124 QQnxScreenEventThread *m_screenEventThread;
125 QQnxNavigatorEventHandler *m_navigatorEventHandler;
126 QQnxAbstractVirtualKeyboard *m_virtualKeyboard;
127 QQnxInputContext *m_inputContext;
128#if QT_CONFIG(qqnx_pps)
131#endif
132 QPlatformInputContext *m_qpaInputContext;
133 mutable QQnxServices *m_services = nullptr;
134 QPlatformFontDatabase *m_fontDatabase;
135 mutable QAbstractEventDispatcher *m_eventDispatcher;
136 QQnxNativeInterface *m_nativeInterface;
137 QList<QQnxScreen*> m_screens;
138 QQnxScreenEventHandler *m_screenEventHandler;
139#if !defined(QT_NO_CLIPBOARD)
140 mutable QQnxClipboard* m_clipboard;
141#endif
142 QQnxAbstractNavigator *m_navigator;
143#if QT_CONFIG(draganddrop)
145#endif
146 QQnxWindowMapper m_windowMapper;
147 mutable QMutex m_windowMapperMutex;
148
149 Options m_options;
150
151#if QT_CONFIG(opengl)
153 void createEglDisplay();
154 void destroyEglDisplay();
155#endif
156
157 static QQnxIntegration *ms_instance;
158
159 friend class QQnxWindow;
160};
161
162QT_END_NAMESPACE
163
164#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()
QPlatformWindow * createForeignWindow(QWindow *window, WId nativeHandle) const override
Options options() const
QQnxScreen * primaryDisplay() const
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