r_efi/protocols/
absolute_pointer.rs1pub const PROTOCOL_GUID: crate::base::Guid = crate::base::Guid::from_fields(
18 0x8d59d32b,
19 0xc655,
20 0x4ae9,
21 0x9b,
22 0x15,
23 &[0xf2, 0x59, 0x04, 0x99, 0x2a, 0x43],
24);
25
26pub const SUPPORTS_ALT_ACTIVE: u32 = 0x00000001;
27pub const SUPPORTS_PRESSURE_AS_Z: u32 = 0x00000002;
28
29#[derive(Clone, Copy, Debug, Default)]
30#[repr(C)]
31pub struct Mode {
32 pub absolute_min_x: u64,
33 pub absolute_min_y: u64,
34 pub absolute_min_z: u64,
35 pub absolute_max_x: u64,
36 pub absolute_max_y: u64,
37 pub absolute_max_z: u64,
38 pub attributes: u32,
39}
40
41pub const TOUCH_ACTIVE: u32 = 0x00000001;
42pub const ALT_ACTIVE: u32 = 0x00000002;
43
44#[derive(Clone, Copy, Debug, Default)]
45#[repr(C)]
46pub struct State {
47 pub current_x: u64,
48 pub current_y: u64,
49 pub current_z: u64,
50 pub active_buttons: u32,
51}
52
53pub type Reset = eficall! {fn(
54 this: *mut Protocol,
55 extended_verification: bool,
56) -> crate::base::Status};
57
58pub type GetState = eficall! {fn(
59 this: *mut Protocol,
60 state: *mut State,
61) -> crate::base::Status};
62
63#[repr(C)]
64pub struct Protocol {
65 pub reset: Reset,
66 pub get_state: GetState,
67 pub wait_for_input: crate::efi::Event,
68 pub mode: *mut Mode,
69}