mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Shut up the type checker
This commit is contained in:
+70
-35
@@ -8,41 +8,76 @@ Event :: struct {using _: Object}
|
|||||||
EventMask :: distinct bit_set[EventType; UInteger]
|
EventMask :: distinct bit_set[EventType; UInteger]
|
||||||
EventMaskAny :: ~EventMask{}
|
EventMaskAny :: ~EventMask{}
|
||||||
|
|
||||||
EventType :: enum UInteger {
|
when size_of(UInteger) == 4 {
|
||||||
LeftMouseDown = 1,
|
// We don't support a 32-bit darwin system but this is mostly to shut up -vet for the time being
|
||||||
LeftMouseUp = 2,
|
EventType :: enum UInteger {
|
||||||
RightMouseDown = 3,
|
LeftMouseDown = 1,
|
||||||
RightMouseUp = 4,
|
LeftMouseUp = 2,
|
||||||
MouseMoved = 5,
|
RightMouseDown = 3,
|
||||||
LeftMouseDragged = 6,
|
RightMouseUp = 4,
|
||||||
RightMouseDragged = 7,
|
MouseMoved = 5,
|
||||||
MouseEntered = 8,
|
LeftMouseDragged = 6,
|
||||||
MouseExited = 9,
|
RightMouseDragged = 7,
|
||||||
KeyDown = 10,
|
MouseEntered = 8,
|
||||||
KeyUp = 11,
|
MouseExited = 9,
|
||||||
FlagsChanged = 12,
|
KeyDown = 10,
|
||||||
AppKitDefined = 13,
|
KeyUp = 11,
|
||||||
SystemDefined = 14,
|
FlagsChanged = 12,
|
||||||
ApplicationDefined = 15,
|
AppKitDefined = 13,
|
||||||
Periodic = 16,
|
SystemDefined = 14,
|
||||||
CursorUpdate = 17,
|
ApplicationDefined = 15,
|
||||||
Rotate = 18,
|
Periodic = 16,
|
||||||
BeginGesture = 19,
|
CursorUpdate = 17,
|
||||||
EndGesture = 20,
|
Rotate = 18,
|
||||||
ScrollWheel = 22,
|
BeginGesture = 19,
|
||||||
TabletPoint = 23,
|
EndGesture = 20,
|
||||||
TabletProximity = 24,
|
ScrollWheel = 22,
|
||||||
OtherMouseDown = 25,
|
TabletPoint = 23,
|
||||||
OtherMouseUp = 26,
|
TabletProximity = 24,
|
||||||
OtherMouseDragged = 27,
|
OtherMouseDown = 25,
|
||||||
Gesture = 29,
|
OtherMouseUp = 26,
|
||||||
Magnify = 30,
|
OtherMouseDragged = 27,
|
||||||
Swipe = 31,
|
Gesture = 29,
|
||||||
SmartMagnify = 32,
|
Magnify = 30,
|
||||||
QuickLook = 33,
|
Swipe = 31,
|
||||||
Pressure = 34,
|
}
|
||||||
DirectTouch = 37,
|
} else {
|
||||||
ChangeMode = 38,
|
EventType :: enum UInteger {
|
||||||
|
LeftMouseDown = 1,
|
||||||
|
LeftMouseUp = 2,
|
||||||
|
RightMouseDown = 3,
|
||||||
|
RightMouseUp = 4,
|
||||||
|
MouseMoved = 5,
|
||||||
|
LeftMouseDragged = 6,
|
||||||
|
RightMouseDragged = 7,
|
||||||
|
MouseEntered = 8,
|
||||||
|
MouseExited = 9,
|
||||||
|
KeyDown = 10,
|
||||||
|
KeyUp = 11,
|
||||||
|
FlagsChanged = 12,
|
||||||
|
AppKitDefined = 13,
|
||||||
|
SystemDefined = 14,
|
||||||
|
ApplicationDefined = 15,
|
||||||
|
Periodic = 16,
|
||||||
|
CursorUpdate = 17,
|
||||||
|
Rotate = 18,
|
||||||
|
BeginGesture = 19,
|
||||||
|
EndGesture = 20,
|
||||||
|
ScrollWheel = 22,
|
||||||
|
TabletPoint = 23,
|
||||||
|
TabletProximity = 24,
|
||||||
|
OtherMouseDown = 25,
|
||||||
|
OtherMouseUp = 26,
|
||||||
|
OtherMouseDragged = 27,
|
||||||
|
Gesture = 29,
|
||||||
|
Magnify = 30,
|
||||||
|
Swipe = 31,
|
||||||
|
SmartMagnify = 32,
|
||||||
|
QuickLook = 33,
|
||||||
|
Pressure = 34,
|
||||||
|
DirectTouch = 37,
|
||||||
|
ChangeMode = 38,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EventPhase :: distinct bit_set[EventPhaseFlag; UInteger]
|
EventPhase :: distinct bit_set[EventPhaseFlag; UInteger]
|
||||||
|
|||||||
Reference in New Issue
Block a user