QtShellSurface QML Type

Provides a simple way to identify and resize a surface. 更多...

import 语句: import QtWayland.Compositor.QtShell
Since: Qt 6.3

特性

信号

方法

详细描述

This type is part of the QtShell extension and provides a way to extend the functionality of an existing WaylandSurface with window management functionality.

The QtShellSurface type holds the core functionality needed to create a compositor that supports the QtShell extension. It can be used directly, or via the QtShellChrome type, depending on what the needs of the compositor are. The QtShellChrome type has default behaviors and convenience APIs for working with QtShellSurface objects.

特性文档编制

active : bool

This property holds whether the surface is currently considered active.

注意: There are no restrictions in QtShellSurface that prevents multiple surfaces from being active simultaneously. Such logic must either be implemented by the compositor itself, or by using the QtShellChrome type, which will automatically manage the activation state of surfaces.

capabilities : enum

This property holds the capabilities of the compositor. By default, no special capabilities are enabled.


frameMarginBottom : int

This holds the window frame margin below the surface.


frameMarginLeft : int

This holds the window frame margin to the left of the surface.


frameMarginRight : int

This holds the window frame margin to the right of the surface.


frameMarginTop : int

This holds the window frame margin above the surface.


[read-only] maximumSize : size

The maximum size of the window if the client has specified one. Otherwise an invalid size.


[read-only] minimumSize : size

The minimum size of the window if the client has specified one. Otherwise an invalid size.


[read-only] surface : WaylandSurface

This property holds the surface associated with this QtShellSurface .


[read-only] windowFlags : int

This property holds the window flags of the QtShellSurface .


[read-only] windowGeometry : rect

This property holds the window geometry of the shell surface.


windowPosition : point

This property holds the position of the shell surface relative to its output.


[read-only] windowState : int

This property holds the window state of the QtShellSurface .

注意: requestWindowGeometry () is called to update state of the surface, the windowState property will not be updated until the client has acknowledged the state change.

[read-only] windowTitle : string

This property holds the window title of the QtShellSurface .


信号文档编制

void startMove ()

The client has requested an interactive move operation in the compositor by calling QWindow::startSystemMove ().

注意: 相应处理程序是 onStartMove .

另请参阅 capabilities .


void startResize ( enum edges )

The client has requested an interactive resize operation in the compositor by calling QWindow::startSystemResize ().

The edges provides information about which edge of the window should be moved during the resize. It is a mask of the following values:

  • Qt.TopEdge
  • Qt.LeftEdge
  • Qt.RightEdge
  • Qt.BottomEdge

注意: 相应处理程序是 onStartResize .

另请参阅 capabilities .


方法文档编制

void initialize ( QtShell qtShell , WaylandSurface surface , WaylandResource resource )

初始化 QtShellSurface , associating it with the given qtShell , surface ,和 resource .


void requestWindowGeometry ( int windowState , rect windowGeometry )

Requests a new windowState and windowGeometry QtShellSurface . The state and geometry is updated when the client has acknowledged the request (at which point it is safe to assume that the surface's buffer has been resized if necessary).


void sendClose ()

Requests that the client application closes itself.