core: darwin: magnify -> zoom_gesture, add workaround from GLFW for command key blocking keyUp on other keys

This commit is contained in:
foxnne 2024-12-13 09:12:55 -06:00 committed by Emi Gutekanst
parent a85916f00f
commit 4a6101241c
2 changed files with 50 additions and 8 deletions

View file

@ -533,10 +533,7 @@ pub const Event = union(enum) {
window_open: struct {
window_id: mach.ObjectID,
},
magnify: struct {
window_id: mach.ObjectID,
magnification: f32,
},
zoom_gesture: ZoomGestureEvent,
focus_gained: struct {
window_id: mach.ObjectID,
},
@ -566,6 +563,17 @@ pub const ResizeEvent = struct {
size: Size,
};
pub const ZoomGestureEvent = struct {
window_id: mach.ObjectID,
phase: GesturePhase,
zoom: f32,
};
pub const GesturePhase = enum {
began,
ended,
};
pub const MouseButton = enum {
left,
right,