quickshell-web/modules/Quickshell.Wayland/WlSessionLock.json

47 lines
2.2 KiB
JSON
Raw Normal View History

2024-09-27 23:35:19 +00:00
{
"name": "WlSessionLock",
"module": "Quickshell.Wayland",
"type": "class",
"super": {
"type": "local",
"module": "Quickshell",
"name": "Reloadable"
},
"description": "Wayland session locker.",
"details": "Wayland session lock implemented using the [ext_session_lock_v1] protocol.\n\nWlSessionLock will create an instance of its `surface` component for every screen when\n`locked` is set to true. The `surface` component must create a TYPE99MQS_Quickshell_Wayland99NWlSessionLockSurface99TYPE\nwhich will be displayed on each screen.\n\nThe below example will create a session lock that disappears when the button is clicked.\n```qml\nWlSessionLock {\n id: lock\n\n WlSessionLockSurface {\n Button {\n text: \"unlock me\"\n onClicked: lock.locked = false\n }\n }\n}\n\n// ...\nlock.locked = true\n```\n\n> [!WARNING] If the WlSessionLock is destroyed or quickshell exits without setting `locked`\n> to false, conformant compositors will leave the screen locked and painted with a solid\n> color.\n>\n> This is what makes the session lock secure. The lock dying will not expose your session,\n> but it will render it inoperable.\n\n[ext_session_lock_v1]: https://wayland.app/protocols/ext-session-lock-v1\n",
"properties": {
"surface": {
"type": {
"type": "qt",
"module": "qml.QtQml",
"name": "Component"
},
"details": "The surface that will be created for each screen. Must create a TYPE99MQS_Quickshell_Wayland99NWlSessionLockSurface99TYPE.\n",
"flags": [
"default"
]
},
"locked": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "Controls the lock state.\n\n> [!WARNING] Only one WlSessionLock may be locked at a time. Attempting to enable a lock while\n> another lock is enabled will do nothing.\n"
},
"secure": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "The compositor lock state.\n\nThis is set to true once the compositor has confirmed all screens are covered with locks.\n",
"flags": [
"readonly"
]
}
},
"functions": [],
"signals": {},
"variants": {}
}