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

47 lines
2.4 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 {{< qmltypelink type=\"local\" module=\"Quickshell.Wayland\" name=\"WlSessionLockSurface\" mtype=\"\" mname=\"\" >}}\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{{< callout type=\"warning\" >}}\n If the WlSessionLock is destroyed or quickshell exits without setting `locked`\nto false, conformant compositors will leave the screen locked and painted with a solid\ncolor.\n\nThis is what makes the session lock secure. The lock dying will not expose your session,\nbut it will render it inoperable.\n{{< /callout >}}\n\n[ext_session_lock_v1]: https://wayland.app/protocols/ext-session-lock-v1\n",
"properties": {
"locked": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "Controls the lock state.\n\n{{< callout type=\"warning\" >}}\n Only one WlSessionLock may be locked at a time. Attempting to enable a lock while\nanother lock is enabled will do nothing.\n\n{{< /callout >}}"
},
"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"
]
},
"surface": {
"type": {
"type": "qt",
"module": "qml.QtQml",
"name": "Component"
},
"details": "The surface that will be created for each screen. Must create a {{< qmltypelink type=\"local\" module=\"Quickshell.Wayland\" name=\"WlSessionLockSurface\" mtype=\"\" mname=\"\" >}}.\n",
"flags": [
"default"
]
}
},
"functions": [],
"signals": {},
"variants": {}
}