core: darwin: magnify -> zoom_gesture, add workaround from GLFW for command key blocking keyUp on other keys
This commit is contained in:
parent
a85916f00f
commit
4a6101241c
2 changed files with 50 additions and 8 deletions
16
src/Core.zig
16
src/Core.zig
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue