1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
pub use crate::{c_float, stdinc::*};
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(transparent)]
pub struct SDL_TouchID(pub Sint64);
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(transparent)]
pub struct SDL_FingerID(pub Sint64);
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(transparent)]
pub struct SDL_TouchDeviceType(pub i32);
pub const SDL_TOUCH_DEVICE_INVALID: SDL_TouchDeviceType =
SDL_TouchDeviceType(-1);
pub const SDL_TOUCH_DEVICE_DIRECT: SDL_TouchDeviceType = SDL_TouchDeviceType(0);
pub const SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE: SDL_TouchDeviceType =
SDL_TouchDeviceType(1);
pub const SDL_TOUCH_DEVICE_INDIRECT_RELATIVE: SDL_TouchDeviceType =
SDL_TouchDeviceType(2);
#[derive(Debug, Clone, Copy, Default, PartialEq, PartialOrd)]
#[repr(C)]
#[allow(missing_docs)]
pub struct SDL_Finger {
pub id: SDL_FingerID,
pub x: c_float,
pub y: c_float,
pub pressure: c_float,
}
pub const SDL_TOUCH_MOUSEID: u32 = -1_i32 as u32;
pub const SDL_MOUSE_TOUCHID: SDL_TouchID = SDL_TouchID(-1);
extern "C" {
pub fn SDL_GetNumTouchDevices();
pub fn SDL_GetTouchDevice(index: c_int) -> SDL_TouchID;
pub fn SDL_GetTouchDeviceType(touchID: SDL_TouchID) -> SDL_TouchDeviceType;
pub fn SDL_GetNumTouchFingers(touchID: SDL_TouchID) -> c_int;
pub fn SDL_GetTouchFinger(
touchID: SDL_TouchID, index: c_int,
) -> *mut SDL_Finger;
}