QtShellSurface QML Type
Provides a simple way to identify and resize a surface. More...
Import Statement: | import QtWayland.Compositor.QtShell |
Since: | Qt 6.3 |
Properties
- active : bool
- capabilities : enum
- frameMarginBottom : int
- frameMarginLeft : int
- frameMarginRight : int
- frameMarginTop : int
- maximumSize : size
- minimumSize : size
- surface : WaylandSurface
- windowFlags : int
- windowGeometry : rect
- windowPosition : point
- windowState : int
- windowTitle : string
Signals
- void startMove()
- void startResize(enum edges)
Methods
- void initialize(QtShell qtShell, WaylandSurface surface, WaylandResource resource)
- void requestWindowGeometry(int windowState, rect windowGeometry)
- void sendClose()
Detailed Description
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.
Property Documentation
active : bool |
This property holds whether the surface is currently considered active.
Note: 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.
- QtShellSurface.InteractiveMove The client can trigger a server-side interactive move operation using QWindow::startSystemMove(). The compositor will be notified of this through the startMove() signal.
- QtShellSurface.InteractiveResize The client can trigger a server-side interactive resize operation using QWindow::startSystemResize(). The compositor will be notified of this through the startResize() signal.
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.
maximumSize : size |
The maximum size of the window if the client has specified one. Otherwise an invalid size.
minimumSize : size |
The minimum size of the window if the client has specified one. Otherwise an invalid size.
surface : WaylandSurface |
This property holds the surface associated with this QtShellSurface.
windowFlags : int |
This property holds the window flags of the QtShellSurface.
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.
windowState : int |
This property holds the window state of the QtShellSurface.
Note: When requestWindowGeometry() is called to update state of the surface, the windowState
property will not be updated until the client has acknowledged the state change.
windowTitle : string |
This property holds the window title of the QtShellSurface.
Signal Documentation
void startMove() |
The client has requested an interactive move operation in the compositor by calling QWindow::startSystemMove().
Note: The corresponding handler is onStartMove
.
See also 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
Note: The corresponding handler is onStartResize
.
See also capabilities.
Method Documentation
void initialize(QtShell qtShell, WaylandSurface surface, WaylandResource resource) |
Initializes the QtShellSurface, associating it with the given qtShell, surface, and resource.
Requests a new windowState and windowGeometry for the 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.
© 2024 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.