mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-20 16:36:46 +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]
|
||||
EventMaskAny :: ~EventMask{}
|
||||
|
||||
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,
|
||||
when size_of(UInteger) == 4 {
|
||||
// We don't support a 32-bit darwin system but this is mostly to shut up -vet for the time being
|
||||
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,
|
||||
}
|
||||
} else {
|
||||
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]
|
||||
|
||||
Reference in New Issue
Block a user