Qt 6.x
The Qt SDK
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/qmutex.h>
10
11#include <screen/screen.h>
12
13#if QT_CONFIG(opengl)
14#include <EGL/egl.h>
15#endif
16
18
20class QQnxFileDialogHelper;
22class QQnxWindow;
23class QQnxScreen;
28class QQnxServices;
29
30class QSimpleDrag;
31
32#if QT_CONFIG(qqnx_pps)
36#endif
37
38#if !defined(QT_NO_CLIPBOARD)
39class QQnxClipboard;
40#endif
41
42template<class K, class V> class QHash;
44
46{
47public:
48 enum Option { // Options to be passed on command line.
49 NoOptions = 0x0,
54 };
56 explicit QQnxIntegration(const QStringList &paramList);
58
59 static QQnxIntegration *instance() { return ms_instance; }
60
62
63 QPlatformWindow *createForeignWindow(QWindow *window, WId nativeHandle) const override;
66
67#if QT_CONFIG(opengl)
68 EGLDisplay eglDisplay() const { return m_eglDisplay; }
70#endif
71
72#if QT_CONFIG(qqnx_pps)
73 QPlatformInputContext *inputContext() const override;
74#endif
75
77
78 bool supportsNavigatorEvents() const;
79
81
82 QPlatformFontDatabase *fontDatabase() const override { return m_fontDatabase; }
83
85
86#if !defined(QT_NO_CLIPBOARD)
87 QPlatformClipboard *clipboard() const override;
88#endif
89#if QT_CONFIG(draganddrop)
90 QPlatformDrag *drag() const override;
91#endif
92 QVariant styleHint(StyleHint hint) const override;
93
94 QPlatformServices *services() const override;
95
96 QWindow *window(screen_window_t qnxWindow) const;
97
98 QQnxScreen *screenForNative(screen_display_t qnxScreen) const;
99
100 void createDisplay(screen_display_t display, bool isPrimary);
102 QQnxScreen *primaryDisplay() const;
103 Options options() const;
104 screen_context_t screenContext();
106
108
109private:
110 void createDisplays();
111 void destroyDisplays();
112
113 void addWindow(screen_window_t qnxWindow, QWindow *window);
114 void removeWindow(screen_window_t qnxWindow);
115 QList<screen_display_t *> sortDisplays(screen_display_t *displays,
116 int displayCount);
117
118 screen_context_t m_screenContext;
119 QByteArray m_screenContextId;
120 QQnxScreenEventThread *m_screenEventThread;
121 QQnxNavigatorEventHandler *m_navigatorEventHandler;
122 QQnxAbstractVirtualKeyboard *m_virtualKeyboard;
123#if QT_CONFIG(qqnx_pps)
124 QQnxNavigatorEventNotifier *m_navigatorEventNotifier;
125 QQnxInputContext *m_inputContext;
126 QQnxButtonEventNotifier *m_buttonsNotifier;
127#endif
128 QPlatformInputContext *m_qpaInputContext;
129 QQnxServices *m_services;
130 QPlatformFontDatabase *m_fontDatabase;
131 mutable QAbstractEventDispatcher *m_eventDispatcher;
132 QQnxNativeInterface *m_nativeInterface;
133 QList<QQnxScreen*> m_screens;
134 QQnxScreenEventHandler *m_screenEventHandler;
135#if !defined(QT_NO_CLIPBOARD)
136 mutable QQnxClipboard* m_clipboard;
137#endif
138 QQnxAbstractNavigator *m_navigator;
139#if QT_CONFIG(draganddrop)
140 QSimpleDrag *m_drag;
141#endif
142 QQnxWindowMapper m_windowMapper;
143 mutable QMutex m_windowMapperMutex;
144
145 Options m_options;
146
147#if QT_CONFIG(opengl)
148 EGLDisplay m_eglDisplay;
149 void createEglDisplay();
150 void destroyEglDisplay();
151#endif
152
153 static QQnxIntegration *ms_instance;
154
155 friend class QQnxWindow;
156};
157
159
160#endif // QQNXINTEGRATION_H
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore
Definition qhash.h:818
Definition qlist.h:74
\inmodule QtCore
Definition qmutex.h:285
\inmodule QtGui
The QPlatformBackingStore class provides the drawing area for top-level windows.
The QPlatformClipboard class provides an abstraction for the system clipboard.
The QPlatformDrag class provides an abstraction for drag.
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.
virtual QPlatformOpenGLContext * createPlatformOpenGLContext(QOpenGLContext *context) const
Factory function for QPlatformOpenGLContext.
virtual QPlatformInputContext * inputContext() const
Returns the platforms input context.
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.
The QPlatformWindow class provides an abstraction for top-level windows.
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)
QByteArray screenContextId()
QQnxScreen * screenForNative(screen_display_t qnxScreen) const
void createDisplay(screen_display_t display, bool isPrimary)
screen_context_t screenContext()
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:28
QSimpleDrag implements QBasicDrag for Drag and Drop operations within the Qt Application itself.
\inmodule QtCore
\inmodule QtCore
Definition qvariant.h:64
\inmodule QtGui
Definition qwindow.h:63
struct wl_display * display
Definition linuxdmabuf.h:41
Combined button and popup list for selecting options.
static void * context
typedef EGLDisplay(EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC)(EGLenum platform
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
GLenum cap
QHash< screen_window_t, QWindow * > QQnxWindowMapper
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
QScreen * screen
[1]
Definition main.cpp:29
aWidget window() -> setWindowTitle("New Window Title")
[2]