sdl3_sys/metadata/generated/
sensor.rs

1//! Metadata for items in the `crate::sensor` module
2
3use super::*;
4
5pub const METADATA_SDL_SensorID: Group = Group {
6    module: "sensor",
7    kind: GroupKind::Id,
8    name: "SDL_SensorID",
9    short_name: "SensorID",
10    doc: Some(
11        "This is a unique ID for a sensor for the time it is connected to the\nsystem, and is never reused for the lifetime of the application.\n\nThe value 0 is an invalid ID.\n\n## Availability\nThis datatype is available since SDL 3.2.0.\n",
12    ),
13    available_since: Some(SDL_VERSIONNUM(3, 2, 0)),
14    values: &[],
15};
16pub const METADATA_SDL_SensorType: Group = Group {
17    module: "sensor",
18    kind: GroupKind::Enum,
19    name: "SDL_SensorType",
20    short_name: "SensorType",
21    doc: Some(
22        "The different sensors defined by SDL.\n\nAdditional sensors may be available, using platform dependent semantics.\n\nHere are the additional Android sensors:\n\n<https://developer.android.com/reference/android/hardware/SensorEvent.html#values>\n\nAccelerometer sensor notes:\n\nThe accelerometer returns the current acceleration in SI meters per second\nsquared. This measurement includes the force of gravity, so a device at\nrest will have an value of [`SDL_STANDARD_GRAVITY`] away from the center of the\nearth, which is a positive Y value.\n\n- `values[0]`: Acceleration on the x axis\n- `values[1]`: Acceleration on the y axis\n- `values[2]`: Acceleration on the z axis\n\nFor phones and tablets held in natural orientation and game controllers\nheld in front of you, the axes are defined as follows:\n\n- -X ... +X : left ... right\n- -Y ... +Y : bottom ... top\n- -Z ... +Z : farther ... closer\n\nThe accelerometer axis data is not changed when the device is rotated.\n\nGyroscope sensor notes:\n\nThe gyroscope returns the current rate of rotation in radians per second.\nThe rotation is positive in the counter-clockwise direction. That is, an\nobserver looking from a positive location on one of the axes would see\npositive rotation on that axis when it appeared to be rotating\ncounter-clockwise.\n\n- `values[0]`: Angular speed around the x axis (pitch)\n- `values[1]`: Angular speed around the y axis (yaw)\n- `values[2]`: Angular speed around the z axis (roll)\n\nFor phones and tablets held in natural orientation and game controllers\nheld in front of you, the axes are defined as follows:\n\n- -X ... +X : left ... right\n- -Y ... +Y : bottom ... top\n- -Z ... +Z : farther ... closer\n\nThe gyroscope axis data is not changed when the device is rotated.\n\n## Availability\nThis enum is available since SDL 3.2.0.\n\n## See also\n- [`SDL_GetCurrentDisplayOrientation`]\n",
23    ),
24    available_since: Some(SDL_VERSIONNUM(3, 2, 0)),
25    values: &[
26        GroupValue {
27            name: "SDL_SENSOR_INVALID",
28            short_name: "INVALID",
29            doc: Some("Returned for an invalid sensor\n"),
30            available_since: None,
31        },
32        GroupValue {
33            name: "SDL_SENSOR_UNKNOWN",
34            short_name: "UNKNOWN",
35            doc: Some("Unknown sensor type\n"),
36            available_since: None,
37        },
38        GroupValue {
39            name: "SDL_SENSOR_ACCEL",
40            short_name: "ACCEL",
41            doc: Some("Accelerometer\n"),
42            available_since: None,
43        },
44        GroupValue {
45            name: "SDL_SENSOR_GYRO",
46            short_name: "GYRO",
47            doc: Some("Gyroscope\n"),
48            available_since: None,
49        },
50        GroupValue {
51            name: "SDL_SENSOR_ACCEL_L",
52            short_name: "ACCEL_L",
53            doc: Some("Accelerometer for left Joy-Con controller and Wii nunchuk\n"),
54            available_since: None,
55        },
56        GroupValue {
57            name: "SDL_SENSOR_GYRO_L",
58            short_name: "GYRO_L",
59            doc: Some("Gyroscope for left Joy-Con controller\n"),
60            available_since: None,
61        },
62        GroupValue {
63            name: "SDL_SENSOR_ACCEL_R",
64            short_name: "ACCEL_R",
65            doc: Some("Accelerometer for right Joy-Con controller\n"),
66            available_since: None,
67        },
68        GroupValue {
69            name: "SDL_SENSOR_GYRO_R",
70            short_name: "GYRO_R",
71            doc: Some("Gyroscope for right Joy-Con controller\n"),
72            available_since: None,
73        },
74        GroupValue {
75            name: "SDL_SENSOR_COUNT",
76            short_name: "COUNT",
77            doc: None,
78            available_since: None,
79        },
80    ],
81};