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 QPlatformInputContext *inputContext() const override;
78
79 void moveToScreen(QWindow *window, int screen);
80
81 bool supportsNavigatorEvents() const;
82
84
85 QPlatformFontDatabase *fontDatabase() const override { return m_fontDatabase; }
86
88
89#if !defined(QT_NO_CLIPBOARD)
90 QPlatformClipboard *clipboard() const override;
91#endif
92#if QT_CONFIG(draganddrop)
94#endif
95 QVariant styleHint(StyleHint hint) const override;
96
97 QPlatformServices *services() const override;
98
99 QWindow *window(screen_window_t qnxWindow) const;
100
101 QQnxScreen *screenForNative(screen_display_t qnxScreen) const;
102
103 void createDisplay(screen_display_t display, bool isPrimary);
104 void removeDisplay(QQnxScreen *screen);
105 QQnxScreen *primaryDisplay() const;
106 Options options() const;
109
111
112private:
113 void createDisplays();
114 void destroyDisplays();
115
116 void addWindow(screen_window_t qnxWindow, QWindow *window);
117 void removeWindow(screen_window_t qnxWindow);
118 QList<screen_display_t *> sortDisplays(screen_display_t *displays,
119 int displayCount);
120
121 screen_context_t m_screenContext;
122 QByteArray m_screenContextId;
123 QQnxScreenEventThread *m_screenEventThread;
124 QQnxNavigatorEventHandler *m_navigatorEventHandler;
125 QQnxAbstractVirtualKeyboard *m_virtualKeyboard;
126 QQnxInputContext *m_inputContext;
127#if QT_CONFIG(qqnx_pps)
130#endif
131 QPlatformInputContext *m_qpaInputContext;
132 mutable QQnxServices *m_services = nullptr;
133 QPlatformFontDatabase *m_fontDatabase;
134 mutable QAbstractEventDispatcher *m_eventDispatcher;
135 QQnxNativeInterface *m_nativeInterface;
136 QList<QQnxScreen*> m_screens;
137 QQnxScreenEventHandler *m_screenEventHandler;
138#if !defined(QT_NO_CLIPBOARD)
139 mutable QQnxClipboard* m_clipboard;
140#endif
141 QQnxAbstractNavigator *m_navigator;
142#if QT_CONFIG(draganddrop)
144#endif
145 QQnxWindowMapper m_windowMapper;
146 mutable QMutex m_windowMapperMutex;
147
148 Options m_options;
149
150#if QT_CONFIG(opengl)
152 void createEglDisplay();
153 void destroyEglDisplay();
154#endif
155
156 static QQnxIntegration *ms_instance;
157
158 friend class QQnxWindow;
159};
160
161QT_END_NAMESPACE
162
163#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
Q_DECLARE_LOGGING_CATEGORY(lcQpaGLContext)
QT_BEGIN_NAMESPACE void qqnxLgmonInit()
Definition qqnxlgmon.h:34