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
4#ifndef QQNXINTEGRATION_H
5#define QQNXINTEGRATION_H
6
7#include <qpa/qplatformintegration.h>
8#include <private/qtguiglobal_p.h>
9#include <QtCore/qhash.h>
10#include <QtCore/qmutex.h>
11
12#include <screen/screen.h>
13#include <QtCore/QLoggingCategory>
14
15#if QT_CONFIG(opengl)
16#include <EGL/egl.h>
17#endif
18
20
21Q_DECLARE_LOGGING_CATEGORY(lcQpaQnx);
23
25class QQnxFileDialogHelper;
27class QQnxWindow;
28class QQnxScreen;
32class QQnxAbstractVirtualKeyboard;
33class QQnxServices;
34
35class QSimpleDrag;
37
38#if QT_CONFIG(qqnx_pps)
39class QQnxNavigatorEventNotifier;
40class QQnxButtonEventNotifier;
41#endif
42
43#if !defined(QT_NO_CLIPBOARD)
44class QQnxClipboard;
45#endif
46
47using QQnxWindowMapper = QHash<screen_window_t, QWindow *>;
48
50{
51public:
52 enum Option { // Options to be passed on command line.
53 NoOptions = 0x0,
58 Desktop = 0x10
59 };
60 Q_DECLARE_FLAGS(Options, Option)
61 explicit QQnxIntegration(const QStringList &paramList);
63
64 static QQnxIntegration *instance() { return ms_instance; }
65
66 bool hasCapability(QPlatformIntegration::Capability cap) const override;
67
68 QPlatformWindow *createForeignWindow(QWindow *window, WId nativeHandle) const override;
69 QPlatformWindow *createPlatformWindow(QWindow *window) const override;
70 QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const override;
71
72#if QT_CONFIG(opengl)
73 EGLDisplay eglDisplay() const { return m_eglDisplay; }
75#endif
76
77#if QT_CONFIG(vulkan)
79#endif
80
81 QPlatformInputContext *inputContext() const override;
82
83 void moveToScreen(QWindow *window, int screen);
84
85 bool supportsNavigatorEvents() const;
86
88
89 QPlatformFontDatabase *fontDatabase() const override { return m_fontDatabase; }
90
92
93#if !defined(QT_NO_CLIPBOARD)
94 QPlatformClipboard *clipboard() const override;
95#endif
96#if QT_CONFIG(draganddrop)
98#endif
99 QVariant styleHint(StyleHint hint) 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
116private:
117 void createDisplays();
118 void destroyDisplays();
119
120 void addWindow(screen_window_t qnxWindow, QWindow *window);
121 void removeWindow(screen_window_t qnxWindow);
122 QList<screen_display_t *> sortDisplays(screen_display_t *displays,
123 int displayCount);
124
125 screen_context_t m_screenContext;
126 QByteArray m_screenContextId;
127 QQnxScreenEventThread *m_screenEventThread;
128 QQnxNavigatorEventHandler *m_navigatorEventHandler;
129 QQnxAbstractVirtualKeyboard *m_virtualKeyboard;
130 QQnxInputContext *m_inputContext;
131#if QT_CONFIG(qqnx_pps)
134#endif
135 QPlatformInputContext *m_qpaInputContext;
136 mutable QQnxServices *m_services = nullptr;
137 QPlatformFontDatabase *m_fontDatabase;
138 mutable QAbstractEventDispatcher *m_eventDispatcher;
139 QQnxNativeInterface *m_nativeInterface;
140 QList<QQnxScreen*> m_screens;
141 QQnxScreenEventHandler *m_screenEventHandler;
142#if !defined(QT_NO_CLIPBOARD)
143 mutable QQnxClipboard* m_clipboard;
144#endif
145 QQnxAbstractNavigator *m_navigator;
146#if QT_CONFIG(draganddrop)
148#endif
149 QQnxWindowMapper m_windowMapper;
150 mutable QMutex m_windowMapperMutex;
151
152 Options m_options;
153
154#if QT_CONFIG(opengl)
156 void createEglDisplay();
157 void destroyEglDisplay();
158#endif
159
160 static QQnxIntegration *ms_instance;
161
162 friend class QQnxWindow;
163};
164
165QT_END_NAMESPACE
166
167#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:31
Combined button and popup list for selecting options.
Q_DECLARE_LOGGING_CATEGORY(lcQpaGLContext)
QT_BEGIN_NAMESPACE void qqnxLgmonInit()
Definition qqnxlgmon.h:34