Lock: add session lock from power button and chandra-ctl lock
CI / test (push) Failing after 52s

- Lock the session from the power button or `chandra-ctl lock`
- Unlock with a face or the password; the password always works
- Add compositor lock module with tests, and a polkit unlock policy (org.chandra.unlock)
- Document the lock flow in docs/lock.md and link it from the README
- Add generated interface bindings for the compositor and widget components
This commit is contained in:
nandi committed 2026-11-29 03:24:46 -08:00
1 parent 7501fc3ad9
commit c790f96e58
131 files changed
+4693 -274

No files matched your search

+82
View File
@@ -0,0 +1,82 @@
// Generated by `wit-bindgen` 0.63.0. DO NOT EDIT!
///|
pub fn mbt_ffi_cabi_realloc(
src_offset : Int,
src_size : Int,
_dst_alignment : Int,
dst_size : Int,
) -> Int {
// malloc
if src_offset == 0 && src_size == 0 {
return mbt_ffi_malloc(dst_size)
}
// free
if dst_size == 0 {
mbt_ffi_free(src_offset)
return 0
}
// realloc
let dst = mbt_ffi_malloc(dst_size)
mbt_ffi_copy(dst, src_offset, if src_size < dst_size { src_size } else { dst_size })
mbt_ffi_free(src_offset)
dst
}
///|
extern "wasm" fn mbt_ffi_copy(dest : Int, src : Int, len : Int) =
#|(func (param i32) (param i32) (param i32) local.get 0 local.get 1 local.get 2 memory.copy)
///|
extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int =
#|(func (param i32) (result i32) (local i32)
#| local.get 0 i32.const 4 i32.add call $moonbit.gc.malloc
#| local.tee 1 i32.const 0 call $moonbit.init_array8
#| local.get 1)
///|
extern "wasm" fn mbt_ffi_free(position : Int) =
#|(func (param i32) local.get 0 call $moonbit.decref)
///|
#doc(hidden)
pub fn wasmExportPopupPostReturn(p0 : Int) -> Unit {
@plasmoid.wasmExportPopupPostReturn(p0)
}
///|
#doc(hidden)
pub fn wasmExportPopup() -> Int {
@plasmoid.wasmExportPopup()
}
///|
#doc(hidden)
pub fn wasmExportOnEvent(p0 : Int, p1 : Int, p2 : Int, p3 : Int) -> Int {
@plasmoid.wasmExportOnEvent(p0, p1, p2, p3)
}
///|
#doc(hidden)
pub fn wasmExportRender(p0 : Int, p1 : Int) -> Int {
@plasmoid.wasmExportRender(p0, p1)
}
///|
#doc(hidden)
pub fn wasmExportRenderPostReturn(p0 : Int) -> Unit {
@plasmoid.wasmExportRenderPostReturn(p0)
}
///|
#doc(hidden)
pub fn wasmExportInfo() -> Int {
@plasmoid.wasmExportInfo()
}
///|
#doc(hidden)
pub fn wasmExportInfoPostReturn(p0 : Int) -> Unit {
@plasmoid.wasmExportInfoPostReturn(p0)
}