Qt 6.x
The Qt SDK
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
64};
65
67
68#endif
static void setSurface(JNIEnv *env, jobject, jint id, jobject jSurface, jint w, jint h)
\inmodule QtCore
Definition qobject.h:90
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
void surfaceDestroyed()
void allowDiscardFrontBufferChanged()
void bufferLockedChanged()
void outputChanged()
void surfaceChanged()
Combined button and popup list for selecting options.
GLenum GLuint buffer
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_MOC_INCLUDE(...)
#define Q_SIGNALS
QT_BEGIN_NAMESPACE typedef uchar * output
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent