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
qeglfskmseventreader_p.h
Go to the documentation of this file.
1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QEGLFSKKMSEVENTREADER_H
6#define QEGLFSKKMSEVENTREADER_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include "private/qeglfsglobal_p.h"
20#include <QObject>
21#include <QThread>
22#include <QMutex>
23#include <QWaitCondition>
24
25QT_BEGIN_NAMESPACE
26
27class QEglFSKmsDevice;
28
30{
36
37 static const int MAX_FLIPS = 32;
40
41 bool event(QEvent *event) override;
42 void updateStatus();
43 void handlePageFlipCompleted(void *key);
44};
45
47{
48public:
49 QEglFSKmsEventReaderThread(int fd) : m_fd(fd) { }
50 void run() override;
51 QEglFSKmsEventHost *eventHost() { return &m_ev; }
52
53private:
54 int m_fd;
56};
57
58class Q_EGLFS_EXPORT QEglFSKmsEventReader
59{
60public:
61 ~QEglFSKmsEventReader();
62
63 void create(QEglFSKmsDevice *device);
64 void destroy();
65
66 void startWaitFlip(void *key, QMutex *mutex, QWaitCondition *cond);
67
68private:
69 QEglFSKmsDevice *m_device = nullptr;
70 QEglFSKmsEventReaderThread *m_thread = nullptr;
71};
72
73QT_END_NAMESPACE
74
75#endif // QEGLFSKKMSEVENTREADER_H
QEglFSKmsEventHost * eventHost()
RegisterWaitFlipEvent(void *key, QMutex *mutex, QWaitCondition *cond)
static const QEvent::Type TYPE
Combined button and popup list for selecting options.
static QT_BEGIN_NAMESPACE void pageFlipHandler(int fd, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec, void *user_data)
QEglFSKmsEventHost::PendingFlipWait pendingFlipWaits[MAX_FLIPS]
bool event(QEvent *event) override
This virtual function receives events to an object and should return true if the event e was recogniz...
void * completedFlips[MAX_FLIPS]
void handlePageFlipCompleted(void *key)