summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions/qwaylandpresentationtime_p.h
blob: c57cd91d238e68104b45ac87206c9d1e3c3023b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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