44 Q_DECLARE_PRIVATE(QWaylandSurface)
45 Q_PROPERTY(QWaylandClient *client READ client CONSTANT)
46 Q_PROPERTY(QRectF sourceGeometry READ sourceGeometry NOTIFY sourceGeometryChanged REVISION(1, 13))
47 Q_PROPERTY(QSize destinationSize READ destinationSize NOTIFY destinationSizeChanged REVISION(1, 13))
48 Q_PROPERTY(QSize bufferSize READ bufferSize NOTIFY bufferSizeChanged REVISION(1, 13))
49 Q_PROPERTY(
int bufferScale READ bufferScale NOTIFY bufferScaleChanged)
50 Q_PROPERTY(Qt::ScreenOrientation contentOrientation READ contentOrientation NOTIFY contentOrientationChanged)
51 Q_PROPERTY(QWaylandSurface::Origin origin READ origin NOTIFY originChanged)
52 Q_PROPERTY(
bool hasContent READ hasContent NOTIFY hasContentChanged)
53 Q_PROPERTY(
bool cursorSurface READ isCursorSurface WRITE markAsCursorSurface NOTIFY cursorSurfaceChanged)
54 Q_PROPERTY(
bool inhibitsIdle READ inhibitsIdle NOTIFY inhibitsIdleChanged REVISION(1, 14))
55 Q_PROPERTY(
bool isOpaque READ isOpaque NOTIFY isOpaqueChanged REVISION(6, 4))
56 Q_MOC_INCLUDE(
"qwaylanddrag.h")
57 Q_MOC_INCLUDE(
"qwaylandcompositor.h")
59 QML_NAMED_ELEMENT(WaylandSurfaceBase)
60 QML_ADDED_IN_VERSION(1, 0)
61 QML_UNCREATABLE(
"Cannot create instance of WaylandSurfaceBase, use WaylandSurface instead")
70 QWaylandSurface(QWaylandCompositor *compositor, QWaylandClient *client, uint id,
int version);
71 ~QWaylandSurface() override;
73 Q_INVOKABLE
void initialize(QWaylandCompositor *compositor, QWaylandClient *client, uint id,
int version);
74 bool isInitialized()
const;
76 QWaylandClient *client()
const;
77 ::wl_client *waylandClient()
const;
79 bool setRole(QWaylandSurfaceRole *role, wl_resource *errorResource, uint32_t errorCode);
80 QWaylandSurfaceRole *role()
const;
82 bool hasContent()
const;
84 QRectF sourceGeometry()
const;
85 QSize destinationSize()
const;
86 QSize bufferSize()
const;
87 int bufferScale()
const;
89 Qt::ScreenOrientation contentOrientation()
const;
91 Origin origin()
const;
93 QWaylandCompositor *compositor()
const;
95 bool inputRegionContains(
const QPoint &p)
const;
96 bool inputRegionContains(
const QPointF &position)
const;
98 Q_INVOKABLE
void destroy();
99 Q_INVOKABLE
bool isDestroyed()
const;
101 Q_INVOKABLE
void frameStarted();
102 Q_INVOKABLE
void sendFrameCallbacks();
104 QWaylandView *primaryView()
const;
105 void setPrimaryView(QWaylandView *view);
107 QList<QWaylandView *> views()
const;
109 static QWaylandSurface *fromResource(::wl_resource *resource);
110 struct wl_resource *resource()
const;
112 void markAsCursorSurface(
bool cursorSurface);
113 bool isCursorSurface()
const;
115 bool inhibitsIdle()
const;
116 bool isOpaque()
const;
119 QWaylandInputMethodControl *inputMethodControl()
const;
123#if QT_CONFIG(clipboard)
124 void updateSelection();
128 QWaylandSurface(QWaylandSurfacePrivate &dptr);
131 void hasContentChanged();
132 void damaged(
const QRegion &rect);
133 void parentChanged(QWaylandSurface *newParent, QWaylandSurface *oldParent);
134 void childAdded(QWaylandSurface *child);
135 Q_REVISION(1, 13)
void sourceGeometryChanged();
136 Q_REVISION(1, 13)
void destinationSizeChanged();
137 Q_REVISION(1, 13)
void bufferSizeChanged();
138 void bufferScaleChanged();
139 void offsetForNextFrame(
const QPoint &offset);
140 void contentOrientationChanged();
141 void surfaceDestroyed();
142 void originChanged();
143 void subsurfacePositionChanged(
const QPoint &position);
144 void subsurfacePlaceAbove(QWaylandSurface *sibling);
145 void subsurfacePlaceBelow(QWaylandSurface *sibling);
146 void dragStarted(QWaylandDrag *drag);
147 void cursorSurfaceChanged();
148 Q_REVISION(14)
void inhibitsIdleChanged();
149 Q_REVISION(6, 4)
void isOpaqueChanged();
151 void configure(
bool hasBuffer);