Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
23
25class QQnxFileDialogHelper;
27class QQnxWindow;
28class QQnxScreen;
33class QQnxServices;
34
35class QSimpleDrag;
36
37#if QT_CONFIG(qqnx_pps)
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 };
60 explicit QQnxIntegration(const QStringList &paramList);
62
63 static QQnxIntegration *instance() { return ms_instance; }
64
66
67 QPlatformWindow *createForeignWindow(QWindow *window, WId nativeHandle) const override;
70
71#if QT_CONFIG(opengl)
72 EGLDisplay eglDisplay() const { return m_eglDisplay; }
74#endif
75
76#if QT_CONFIG(qqnx_pps)
77 QPlatformInputContext *inputContext() const override;
78#endif
79
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)
94 QPlatformDrag *drag() const override;
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);
106 QQnxScreen *primaryDisplay() const;
107 Options options() const;
108 screen_context_t screenContext();
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#if QT_CONFIG(qqnx_pps)
128 QQnxNavigatorEventNotifier *m_navigatorEventNotifier;
129 QQnxInputContext *m_inputContext;
130 QQnxButtonEventNotifier *m_buttonsNotifier;
131#endif
132 QPlatformInputContext *m_qpaInputContext;
133 QQnxServices *m_services;
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)
144 QSimpleDrag *m_drag;
145#endif
146 QQnxWindowMapper m_windowMapper;
147 mutable QMutex m_windowMapperMutex;
148
149 Options m_options;
150
151#if QT_CONFIG(opengl)
152 EGLDisplay m_eglDisplay;
153 void createEglDisplay();
154 void destroyEglDisplay();
155#endif
156
157 static QQnxIntegration *ms_instance;
158
159 friend class QQnxWindow;
160};
161
163
164#endif // QQNXINTEGRATION_H
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore
Definition qmutex.h:281
\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.
QQnxIntegration(const QStringList &paramList)
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:31
QSimpleDrag implements QBasicDrag for Drag and Drop operations within the Qt Application itself.
\inmodule QtCore
\inmodule QtCore
Definition qvariant.h:65
\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
#define Q_DECLARE_LOGGING_CATEGORY(name)
GLenum cap
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
QScreen * screen
[1]
Definition main.cpp:29
aWidget window() -> setWindowTitle("New Window Title")
[2]