chore: remove platform DeviceId
The same as for `WindowId`.
This commit is contained in:
parent
da2268ae22
commit
4e3165f3d8
18 changed files with 79 additions and 123 deletions
|
|
@ -15,7 +15,7 @@ use crate::application::ApplicationHandler;
|
|||
use crate::cursor::Cursor;
|
||||
use crate::dpi::{PhysicalPosition, PhysicalSize, Position, Size};
|
||||
use crate::error::{EventLoopError, NotSupportedError, RequestError};
|
||||
use crate::event::{self, Force, StartCause, SurfaceSizeWriter};
|
||||
use crate::event::{self, DeviceId, Force, StartCause, SurfaceSizeWriter};
|
||||
use crate::event_loop::{
|
||||
ActiveEventLoop as RootActiveEventLoop, ControlFlow, DeviceEvents,
|
||||
EventLoopProxy as RootEventLoopProxy, OwnedDisplayHandle as RootOwnedDisplayHandle,
|
||||
|
|
@ -314,7 +314,7 @@ impl EventLoop {
|
|||
let mut input_status = InputStatus::Handled;
|
||||
match event {
|
||||
InputEvent::MotionEvent(motion_event) => {
|
||||
let device_id = Some(event::DeviceId(DeviceId(motion_event.device_id())));
|
||||
let device_id = Some(DeviceId::from_raw(motion_event.device_id() as i64));
|
||||
let action = motion_event.action();
|
||||
|
||||
let pointers: Option<
|
||||
|
|
@ -452,7 +452,7 @@ impl EventLoop {
|
|||
);
|
||||
|
||||
let event = event::WindowEvent::KeyboardInput {
|
||||
device_id: Some(event::DeviceId(DeviceId(key.device_id()))),
|
||||
device_id: Some(DeviceId::from_raw(key.device_id() as i64)),
|
||||
event: event::KeyEvent {
|
||||
state,
|
||||
physical_key: keycodes::to_physical_key(keycode),
|
||||
|
|
@ -728,9 +728,6 @@ impl OwnedDisplayHandle {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
|
||||
pub struct DeviceId(i32);
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
|
||||
pub struct FingerId(i32);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue