summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions/qwaylandpresentationtime_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compositor/extensions/qwaylandpresentationtime_p.h')
-rw-r--r--src/compositor/extensions/qwaylandpresentationtime_p.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/compositor/extensions/qwaylandpresentationtime_p.h b/src/compositor/extensions/qwaylandpresentationtime_p.h
new file mode 100644
index 000000000..c57cd91d2
--- /dev/null
+++ b/src/compositor/extensions/qwaylandpresentationtime_p.h
@@ -0,0 +1,49 @@
+// Copyright (C) 2021 LG Electronics Inc.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#ifndef QWAYLANDPRESENTATIONTIME_P_H
+#define QWAYLANDPRESENTATIONTIME_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QObject>
+#include <QtWaylandCompositor/qwaylandcompositorextension.h>
+#include <QtCore/private/qglobal_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickWindow;
+class QWaylandPresentationTimePrivate;
+
+class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandPresentationTime : public QWaylandCompositorExtensionTemplate<QWaylandPresentationTime>
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QWaylandPresentationTime)
+public:
+ QWaylandPresentationTime();
+ QWaylandPresentationTime(QWaylandCompositor *compositor);
+
+ QWaylandCompositor *compositor() const;
+ void initialize() override;
+
+ Q_INVOKABLE void sendFeedback(QQuickWindow *window, quint64 sequence, quint64 tv_sec, quint32 tv_nsec);
+
+ static const struct wl_interface *interface();
+ static QByteArray interfaceName();
+
+Q_SIGNALS:
+ void presented(quint64 sequence, quint64 tv_sec, quint32 tv_nsec, quint32 refresh_nsec);
+};
+
+QT_END_NAMESPACE
+
+#endif