在本页

WaylandSurface QML Type

代表输出设备上的一个矩形区域。更多

Import Statement: import QtWayland.Compositor
In C++: QWaylandSurface

属性

信号

方法

详细说明

该类型封装了在输出设备上显示的矩形像素区域。它对应于 Wayland 协议中的接口wl_surface

属性文档

bufferScale : size [read-only]

该属性用于保存WaylandSurface 的缓冲区缩放比例。缓冲区刻度允许客户端提供更高分辨率的缓冲区数据,以用于高分辨率输出。

bufferSize : size [read-only]

此属性表示WaylandSurface 当前缓冲区的大小(像素),而不是表面坐标。

若要获取表面坐标大小,请使用destinationSize

另请参阅 destinationSizebufferScale

client : WaylandClient [read-only]

该属性用于保存使用该WaylandSurface 的客户端。

contentOrientation : enum [read-only]

该属性表示WaylandSurface 内容的方向。

另请参阅 WaylandOutput.transform

cursorSurface : bool

WaylandSurface 是否是游标表面,该属性都有效。

destinationSize : size [read-only]

该属性用曲面坐标表示WaylandSurface 的大小。

另请参阅 bufferScalebufferSize

hasContent : bool [read-only]

该属性表示WaylandSurface 是否有内容。

inhibitsIdle : bool [read-only]

此属性表示此曲面是否用于抑制合成器的空闲行为,如屏幕空白、锁定和屏幕保存。

另请参阅 IdleInhibitManagerV1

isOpaque : bool [read-only, since 6.4]

此属性保留曲面是否完全不透明,正如客户端通过 set_opaque_region 请求所报告的那样。

此属性在 Qt 6.4 中引入。

origin : enum [read-only]

此属性保存WaylandSurface 缓冲区的原点,如果曲面没有缓冲区,则保存WaylandSurface.OriginTopLeft 的原点。

它可以有以下值:

sourceGeometry : rect [read-only]

该属性描述了所附 Wayland 缓冲区中应绘制在屏幕上的部分。坐标从缓冲区的角落开始,按bufferScale 缩放。

另请参阅 bufferScalebufferSizedestinationSize

useTextureAlpha : bool

此属性用于指定曲面是否使用纹理 alpha。

信号文档

childAdded(WaylandSurface child)

当一个 wl_subsurface,child, 被添加到曲面时会发出这个信号。

注: 相应的处理程序是onChildAdded

void dragStarted(WaylandDrag drag)

drag 从该曲面启动时发出该信号。

注: 相应的处理程序是onDragStarted

surfaceDestroyed()

该信号在相应的 wl_surface 被销毁时发出。

注: 相应的处理程序是onSurfaceDestroyed

方法文档

void destroy()

摧毁WaylandSurface.

void initialize(WaylandCompositor compositor, WaylandClient client, int id, int version)

用给定的compositorclient 以及给定的idversion 初始化WaylandSurface

bool isDestroyed()

如果WaylandSurface 已被销毁,则返回true 。否则返回false

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.