mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 07:03:15 -04:00
Add touch pressure information for touch events on iOS (#1090)
* Add touch pressure information for touch events on iOS * Add a variant for calibrated touch pressure
This commit is contained in:
@@ -39,6 +39,7 @@ pub(crate) fn implement_touch<T: 'static>(
|
||||
),
|
||||
phase: TouchPhase::Started,
|
||||
location: (x, y).into(),
|
||||
force: None, // TODO
|
||||
id: id as u64,
|
||||
}),
|
||||
wid,
|
||||
@@ -61,6 +62,7 @@ pub(crate) fn implement_touch<T: 'static>(
|
||||
),
|
||||
phase: TouchPhase::Ended,
|
||||
location: pt.location.into(),
|
||||
force: None, // TODO
|
||||
id: id as u64,
|
||||
}),
|
||||
pt.wid,
|
||||
@@ -78,6 +80,7 @@ pub(crate) fn implement_touch<T: 'static>(
|
||||
),
|
||||
phase: TouchPhase::Moved,
|
||||
location: (x, y).into(),
|
||||
force: None, // TODO
|
||||
id: id as u64,
|
||||
}),
|
||||
pt.wid,
|
||||
@@ -94,6 +97,7 @@ pub(crate) fn implement_touch<T: 'static>(
|
||||
),
|
||||
phase: TouchPhase::Cancelled,
|
||||
location: pt.location.into(),
|
||||
force: None, // TODO
|
||||
id: pt.id as u64,
|
||||
}),
|
||||
pt.wid,
|
||||
|
||||
@@ -918,6 +918,7 @@ impl<T: 'static> EventProcessor<T> {
|
||||
device_id: mkdid(xev.deviceid),
|
||||
phase,
|
||||
location,
|
||||
force: None, // TODO
|
||||
id: xev.detail as u64,
|
||||
}),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user