WaylandSurface QML Type
代表输出设备上的一个矩形区域。更多
Import Statement: | import QtWayland.Compositor |
In C++: | QWaylandSurface |
属性
- bufferScale : size
- bufferSize : size
- client : WaylandClient
- contentOrientation : enum
- cursorSurface : bool
- destinationSize : size
- hasContent : bool
- inhibitsIdle : bool
- isOpaque : bool
(since 6.4)
- origin : enum
- sourceGeometry : rect
- useTextureAlpha : bool
信号
- childAdded(WaylandSurface child)
- void dragStarted(WaylandDrag drag)
- surfaceDestroyed()
方法
- void destroy()
- void initialize(WaylandCompositor compositor, WaylandClient client, int id, int version)
- bool isDestroyed()
详细说明
该类型封装了在输出设备上显示的矩形像素区域。它对应于 Wayland 协议中的接口wl_surface
。
属性文档
bufferScale : size |
该属性用于保存WaylandSurface 的缓冲区比例。缓冲区比例可让客户端提供更高分辨率的缓冲区数据,以用于高分辨率输出。
bufferSize : size |
该属性表示WaylandSurface 当前缓冲区的大小(单位:像素),而不是表面坐标。
要获得表面坐标的大小,请使用destinationSize 。
另请参阅 destinationSize 和bufferScale 。
client : WaylandClient |
此属性用于保存使用此WaylandSurface 的客户端。
contentOrientation : enum |
该属性显示WaylandSurface 内容的方向。
另请参阅 WaylandOutput.transform 。
cursorSurface : bool |
该属性显示WaylandSurface 是否为光标表面。
destinationSize : size |
该属性表示WaylandSurface 在曲面坐标中的大小。
另请参阅 bufferScale 和bufferSize 。
hasContent : bool |
此属性表示WaylandSurface 是否有内容。
inhibitsIdle : bool |
此属性显示此曲面是否用于抑制合成器的空闲行为,如屏幕空白、锁定和屏幕保存。
另请参阅 IdleInhibitManagerV1 。
isOpaque : bool |
此属性保留曲面是否完全不透明,如客户端通过 set_opaque_region 请求所报告的。
此属性在 Qt 6.4 中引入。
origin : enum |
该属性保存WaylandSurface 缓冲区的原点,如果曲面没有缓冲区,则保存WaylandSurface.OriginTopLeft 的原点。
它可以有以下值:
- WaylandSurface.OriginTopLeft 原点是缓冲区的左上角。
- WaylandSurface.OriginBottomLeft 原点是缓冲区的左下角。
sourceGeometry : rect |
该属性描述了应在屏幕上绘制的附加 Wayland 缓冲区部分。坐标从缓冲区的角落开始,按bufferScale 缩放。
另请参阅 bufferScale,bufferSize, 和destinationSize 。
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) |
使用给定的compositor 和client 以及给定的id 和version 初始化WaylandSurface 。
bool isDestroyed() |
如果WaylandSurface 已被销毁,则返回true
。否则返回false
。
© 2025 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.