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
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// Qt-Security score:critical reason:network-protocol
4
5#ifndef QWAYLANDPRESENTATIONTIME_P_P_H
6#define QWAYLANDPRESENTATIONTIME_P_P_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 <QtWaylandCompositor/private/qwaylandcompositorextension_p.h>
20#include <QtWaylandCompositor/private/qwayland-server-presentation-time.h>
21
22#include <QObject>
23#include <QPointer>
24#include <QMultiMap>
25
27
28
29class QWaylandSurface;
30class QWaylandView;
31class QQuickWindow;
32
34{
36public:
38
39 void setSurface(QWaylandSurface *);
40 QWaylandSurface *surface() { return m_surface; }
41
42 void destroy();
43 void sendSyncOutput();
44
45private Q_SLOTS:
46 void discard();
47 void onSurfaceCommit();
48 void onSurfaceMapped();
49 void onWindowChanged();
50 void onSync();
51 void onSwapped();
52 void sendPresented(quint64 sequence, quint64 tv_sec, quint32 tv_nsec, quint32 refresh_nsec);
53
54private:
55 QWaylandPresentationTime *presentationTime() { return m_presentationTime; }
56 void maybeConnectToWindow(QWaylandView *);
57 void connectToWindow(QQuickWindow *);
58
59 void wp_presentation_feedback_destroy_resource(Resource *resource) override;
60
61public:
63 QWaylandSurface *m_surface = nullptr;
64 QQuickWindow *m_connectedWindow = nullptr;
65
66 bool m_committed = false;
67 bool m_sync = false;
68};
69
71{
72 Q_DECLARE_PUBLIC(QWaylandPresentationTime)
73public:
75
76protected:
77 void wp_presentation_feedback(Resource *resource, struct ::wl_resource *surface, uint32_t callback) override;
78 void wp_presentation_bind_resource(Resource *resource) override;
79};
80
81QT_END_NAMESPACE
82
83#endif
void setSurface(QWaylandSurface *)
void wp_presentation_feedback_destroy_resource(Resource *resource) override
QWaylandPresentationTime * m_presentationTime
void wp_presentation_bind_resource(Resource *resource) override
\qmltype PresentationTime \nativetype QWaylandPresentationTime \inqmlmodule QtWayland....
Combined button and popup list for selecting options.