1use crate::map_jump_table;
4
5#[repr(transparent)]
6#[derive(Default, Debug, Copy, Clone, Eq, PartialEq)]
7pub struct V5_TouchEvent(pub core::ffi::c_uchar);
8
9impl V5_TouchEvent {
10 pub const kTouchEventRelease: Self = Self(0);
11 pub const kTouchEventPress: Self = Self(1);
12 pub const kTouchEventPressAuto: Self = Self(2);
13}
14
15#[repr(C)]
16#[derive(Default, Copy, Clone, Eq, PartialEq, Debug)]
17pub struct V5_TouchStatus {
18 pub lastEvent: V5_TouchEvent,
19 pub lastXpos: i16,
20 pub lastYpos: i16,
21 pub pressCount: i32,
22 pub releaseCount: i32,
23}
24
25map_jump_table! {
26 0x960 => pub fn vexTouchUserCallbackSet(callback: unsafe extern "C" fn(V5_TouchEvent, i32, i32)),
27 0x964 => pub fn vexTouchDataGet(status: *mut V5_TouchStatus),
28}