Remove DeviceEvent::Motion and WindowEvent::AxisMotion
We decided to remove them because they contained too little information for the user to be useful. The assumption is that they were originally implemented to enable gamepad support, which we already decided we are not going to add directly to Winit.
This commit is contained in:
parent
b7a7f59298
commit
546962c904
8 changed files with 9 additions and 79 deletions
13
src/event.rs
13
src/event.rs
|
|
@ -340,9 +340,6 @@ pub enum WindowEvent {
|
|||
/// touchpad is being pressed) and stage (integer representing the click level).
|
||||
TouchpadPressure { device_id: DeviceId, pressure: f32, stage: i64 },
|
||||
|
||||
/// Motion on some analog axis. May report data redundant to other, more specific events.
|
||||
AxisMotion { device_id: DeviceId, axis: AxisId, value: f64 },
|
||||
|
||||
/// Touch event has been received
|
||||
///
|
||||
/// ## Platform-specific
|
||||
|
|
@ -492,14 +489,6 @@ pub enum DeviceEvent {
|
|||
delta: MouseScrollDelta,
|
||||
},
|
||||
|
||||
/// Motion on some analog axis. This event will be reported for all arbitrary input devices
|
||||
/// that winit supports on this platform, including mouse devices. If the device is a mouse
|
||||
/// device then this will be reported alongside the MouseMotion event.
|
||||
Motion {
|
||||
axis: AxisId,
|
||||
value: f64,
|
||||
},
|
||||
|
||||
Button {
|
||||
button: ButtonId,
|
||||
state: ElementState,
|
||||
|
|
@ -1082,7 +1071,6 @@ mod tests {
|
|||
phase: event::TouchPhase::Started,
|
||||
});
|
||||
with_window_event(TouchpadPressure { device_id: did, pressure: 0.0, stage: 0 });
|
||||
with_window_event(AxisMotion { device_id: did, axis: 0, value: 0.0 });
|
||||
with_window_event(Touch(event::Touch {
|
||||
device_id: did,
|
||||
phase: event::TouchPhase::Started,
|
||||
|
|
@ -1105,7 +1093,6 @@ mod tests {
|
|||
with_device_event(MouseWheel {
|
||||
delta: event::MouseScrollDelta::LineDelta(0.0, 0.0),
|
||||
});
|
||||
with_device_event(Motion { axis: 0, value: 0.0 });
|
||||
with_device_event(Button { button: 0, state: event::ElementState::Pressed });
|
||||
}
|
||||
}};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue