mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 15:13:13 -04:00
Add smart magnify gesture support for macOS (#2554)
* Add smart magnification gesture
* Deliver position of smart magnification event
* Document smart magnification event
* Revert "Deliver position of smart magnification event"
This reverts commit ac0e61a9a4.
* Remove mention of touchpad from smart magnification event
* Update change log
* Mention minimum macOS version supporting smart magnification
* Improve doc
This commit is contained in:
@@ -858,6 +858,20 @@ declare_class!(
|
||||
AppState::queue_event(EventWrapper::StaticEvent(window_event));
|
||||
}
|
||||
|
||||
#[sel(smartMagnifyWithEvent:)]
|
||||
fn smart_magnify_with_event(&self, _event: &NSEvent) {
|
||||
trace_scope!("smartMagnifyWithEvent:");
|
||||
|
||||
let window_event = Event::WindowEvent {
|
||||
window_id: self.window_id(),
|
||||
event: WindowEvent::SmartMagnify {
|
||||
device_id: DEVICE_ID,
|
||||
},
|
||||
};
|
||||
|
||||
AppState::queue_event(EventWrapper::StaticEvent(window_event));
|
||||
}
|
||||
|
||||
#[sel(rotateWithEvent:)]
|
||||
fn rotate_with_event(&self, event: &NSEvent) {
|
||||
trace_scope!("rotateWithEvent:");
|
||||
|
||||
Reference in New Issue
Block a user