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
qwaylandpresentationtime_p_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 LG Electronics Inc.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWAYLANDPRESENTATIONTIME_P_P_H
5#define QWAYLANDPRESENTATIONTIME_P_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtWaylandCompositor/private/qwaylandcompositorextension_p.h>
19#include <QtWaylandCompositor/private/qwayland-server-presentation-time.h>
20
21#include <QObject>
22#include <QPointer>
23#include <QMultiMap>
24
26
27
28class QWaylandSurface;
29class QWaylandView;
30class QQuickWindow;
31
32class PresentationFeedback : public QObject, public QtWaylandServer::wp_presentation_feedback
33{
35public:
36 PresentationFeedback(QWaylandPresentationTime *, QWaylandSurface *, struct ::wl_client *, uint32_t, int);
37
40
41 void destroy();
42 void sendSyncOutput();
43
44private Q_SLOTS:
45 void discard();
46 void onSurfaceCommit();
47 void onSurfaceMapped();
48 void onWindowChanged();
49 void onSync();
50 void onSwapped();
51 void sendPresented(quint64 sequence, quint64 tv_sec, quint32 tv_nsec, quint32 refresh_nsec);
52
53private:
54 QWaylandPresentationTime *presentationTime() { return m_presentationTime; }
55 void maybeConnectToWindow(QWaylandView *);
56 void connectToWindow(QQuickWindow *);
57
58 void wp_presentation_feedback_destroy_resource(Resource *resource) override;
59
60public:
64
65 bool m_committed = false;
66 bool m_sync = false;
67};
68
69class QWaylandPresentationTimePrivate : public QWaylandCompositorExtensionPrivate, public QtWaylandServer::wp_presentation
70{
71 Q_DECLARE_PUBLIC(QWaylandPresentationTime)
72public:
74
75protected:
76 void wp_presentation_feedback(Resource *resource, struct ::wl_resource *surface, uint32_t callback) override;
77 void wp_presentation_bind_resource(Resource *resource) override;
78};
79
81
82#endif
void setSurface(QWaylandSurface *)
void wp_presentation_feedback_destroy_resource(Resource *resource) override
QWaylandPresentationTime * m_presentationTime
PresentationFeedback(QWaylandPresentationTime *, QWaylandSurface *, struct ::wl_client *, uint32_t, int)
\inmodule QtCore
Definition qobject.h:103
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
void wp_presentation_bind_resource(Resource *resource) override
void wp_presentation_feedback(Resource *resource, struct ::wl_resource *surface, uint32_t callback) override
\qmltype PresentationTime \instantiates QWaylandPresentationTime \inqmlmodule QtWayland....
\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor
\qmltype WaylandView \instantiates QWaylandView \inqmlmodule QtWayland.Compositor
Combined button and popup list for selecting options.
#define Q_OBJECT
#define Q_SLOTS
unsigned int quint32
Definition qtypes.h:50
unsigned long long quint64
Definition qtypes.h:61