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
qqnxscreeneventthread.h
Go to the documentation of this file.
1// Copyright (C) 2017 QNX Software Systems. All rights reserved.
2// Copyright (C) 2011 - 2012 Research In Motion
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4// Qt-Security score:significant reason:default
5
6#ifndef QQNXSCREENEVENTTHREAD_H
7#define QQNXSCREENEVENTTHREAD_H
8
9#include <QtCore/QThread>
10#include <QtCore/QMutex>
11#include <QtCore/QHash>
12
13#include <screen/screen.h>
14#include <sys/siginfo.h>
15
17
18Q_DECLARE_OPAQUE_POINTER(screen_window_t)
19Q_DECLARE_METATYPE(screen_window_t)
20
21class QQnxScreenEventThread : public QThread
22{
23 Q_OBJECT
24
25public:
26 QQnxScreenEventThread(screen_context_t context);
27 ~QQnxScreenEventThread();
28
29 screen_context_t context() const { return m_screenContext; }
30 void armEventsPending(int count);
31 bool registerUpdateNotification(screen_window_t window);
32 void unregisterUpdateNotification(screen_window_t window);
33
34protected:
35 void run() override;
36
37Q_SIGNALS:
38 void eventsPending();
39 void postEventReceived(screen_window_t window);
40
41private:
42 void handleScreenPulse(const struct _pulse &msg);
43 void handleArmPulse(const struct _pulse &msg);
44 void handlePostPulse(const struct _pulse &msg);
45 void handlePulse(const struct _pulse &msg);
46 void shutdown();
47
48 int m_channelId;
49 int m_connectionId;
50 struct sigevent m_screenEvent;
51 QHash<screen_window_t, struct sigevent> m_postEvents;
52 screen_context_t m_screenContext;
53 bool m_emitNeededOnNextScreenPulse = true;
54 int m_screenPulsesSinceLastArmPulse = 0;
55};
56
57QT_END_NAMESPACE
58
59#endif // QQNXSCREENEVENTTHREAD_H
QAbstractEventDispatcher * createEventDispatcher() const override
Factory function for the GUI event dispatcher.
bool hasCapability(QPlatformIntegration::Capability cap) const override
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.
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
QQnxNativeInterface(QQnxIntegration *integration)
void setScreenEventThread(QQnxScreenEventThread *eventThread)
int depth() const override
Reimplement in subclass to return current depth of the screen.
void adjustOrientation()
QQnxServices(QQnxAbstractNavigator *navigator)
The QQnxWindow is the base class of the various classes used as instances of QPlatformWindow in the Q...
Definition qqnxwindow.h:32
void setScreen(QQnxScreen *platformScreen)
Combined button and popup list for selecting options.
#define Q_SCREEN_CRITICALERROR(x, message)
Definition qqnxglobal.h:20
#define Q_SCREEN_CHECKERROR(x, message)
Definition qqnxglobal.h:17
static bool getRequestedDisplays(QJsonArray &requestedDisplays)
Read JSON configuration file for the QNX display order.
static int getIdOfDisplay(screen_display_t display)
Get display ID for given display.
static int getContextCapabilities(const QStringList &paramList)
static QQnxIntegration::Options parseOptions(const QStringList &paramList)