feat: Phase2 Task1 — DeviceCommand添加SetCursorVisible + DeviceCapability::Cursor

This commit is contained in:
showen
2026-03-13 07:14:44 +08:00
parent 28566386d2
commit f0605196fe
4 changed files with 48 additions and 0 deletions

View File

@@ -207,6 +207,8 @@ pub enum DeviceCapability {
Framebuffer,
/// GPIO
GPIO,
/// 光标控制能力
Cursor,
}
/// 设备命令(业务插件 → DevicePlugin
@@ -222,6 +224,10 @@ pub enum DeviceCommand {
WriteFramebuffer { data: Vec<u8>, format: PixelFormat },
/// 设置防息屏
SetSleepInhibit(bool),
/// 设置光标可见性
/// - true: 显示光标
/// - false: 隐藏光标(通过 unclutter 或平台特定方式)
SetCursorVisible(bool),
/// 获取电池电量
GetBatteryLevel,
/// 设置音量0-100