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
qwaylandview.h
Go to the documentation of this file.
1// Copyright (C) 2017 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWAYLANDSURFACEVIEW_H
5#define QWAYLANDSURFACEVIEW_H
6
7#include <QtWaylandCompositor/QWaylandBufferRef>
8#include <QtWaylandCompositor/qtwaylandcompositorglobal.h>
9
10#include <QtCore/QPointF>
11#include <QtCore/QObject>
12
14
15class QWaylandSurface;
17class QWaylandOutput;
18
19class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandView : public QObject
20{
22 Q_DECLARE_PRIVATE(QWaylandView)
23 Q_PROPERTY(QObject *renderObject READ renderObject CONSTANT)
24 Q_PROPERTY(QWaylandSurface *surface READ surface WRITE setSurface NOTIFY surfaceChanged)
25 Q_PROPERTY(QWaylandOutput *output READ output WRITE setOutput NOTIFY outputChanged)
26 Q_PROPERTY(bool bufferLocked READ isBufferLocked WRITE setBufferLocked NOTIFY bufferLockedChanged)
27 Q_PROPERTY(bool allowDiscardFrontBuffer READ allowDiscardFrontBuffer WRITE setAllowDiscardFrontBuffer NOTIFY allowDiscardFrontBufferChanged)
28 Q_MOC_INCLUDE("qwaylandoutput.h")
29public:
30 QWaylandView(QObject *renderObject = nullptr, QObject *parent = nullptr);
31 ~QWaylandView() override;
32
33 QObject *renderObject() const;
34
35 QWaylandSurface *surface() const;
36 void setSurface(QWaylandSurface *surface);
37
38 QWaylandOutput *output() const;
39 void setOutput(QWaylandOutput *output);
40
41 virtual void bufferCommitted(const QWaylandBufferRef &buffer, const QRegion &damage);
42 virtual bool advance();
43 virtual void discardCurrentBuffer();
44 virtual QWaylandBufferRef currentBuffer();
45 virtual QRegion currentDamage();
46
47 bool isBufferLocked() const;
48 void setBufferLocked(bool locked);
49
50 bool allowDiscardFrontBuffer() const;
51 void setAllowDiscardFrontBuffer(bool discard);
52
53 void setPrimary();
54 bool isPrimary() const;
55
56 struct wl_resource *surfaceResource() const;
57
59 void surfaceChanged();
60 void surfaceDestroyed();
61 void outputChanged();
62 void bufferLockedChanged();
63 void allowDiscardFrontBufferChanged();
64};
65
67
68#endif
\inmodule QtCore
Definition qobject.h:103
The QRegion class specifies a clip region for a painter.
Definition qregion.h:27
\inmodule QtWaylandCompositor
\qmltype WaylandOutput \instantiates QWaylandOutput \inqmlmodule QtWayland.Compositor
\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor
\qmltype WaylandView \instantiates QWaylandView \inqmlmodule QtWayland.Compositor
Combined button and popup list for selecting options.
GLenum GLuint buffer
GLfloat GLfloat GLfloat GLfloat h
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_MOC_INCLUDE(...)
#define Q_SIGNALS
QT_BEGIN_NAMESPACE typedef uchar * output