feat(pointer): virtio tablet as 2nd input dev (driver per-instance VAs, abs/btn decode), input server serves 2 devices on one notif; display software cursor, bar click switches window, presses/releases to front window in its px; k-ui hit-tests (press focuses, release on same presses, field only focuses)
This commit is contained in:
@@ -8,6 +8,21 @@ pub const SUBSCRIBE: usize = 2;
|
||||
pub mod event {
|
||||
pub const KEY_DOWN: usize = 1;
|
||||
pub const KEY_UP: usize = 2;
|
||||
/// A pointer event: word 1 the button (0 left, 1 right) or finger,
|
||||
/// word 2 `x | y << 16`. From the input server, a fraction of the
|
||||
/// screen (0 to 65535 each way); from the display to a window, that
|
||||
/// window's pixels.
|
||||
pub const POINTER_DOWN: usize = 3;
|
||||
pub const POINTER_MOVE: usize = 4;
|
||||
pub const POINTER_UP: usize = 5;
|
||||
|
||||
pub const fn pack_point(x: u16, y: u16) -> usize {
|
||||
x as usize | (y as usize) << 16
|
||||
}
|
||||
|
||||
pub const fn unpack_point(word: usize) -> (u16, u16) {
|
||||
(word as u16, (word >> 16) as u16)
|
||||
}
|
||||
/// A function key: `extra` is its number (F1 is 1).
|
||||
pub const FUNCTION_KEY: usize = 10;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user