mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-08 08:38:51 +00:00
Shut up the type checker
This commit is contained in:
+36
-1
@@ -8,7 +8,41 @@ 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 {
|
||||||
|
// 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,
|
LeftMouseDown = 1,
|
||||||
LeftMouseUp = 2,
|
LeftMouseUp = 2,
|
||||||
RightMouseDown = 3,
|
RightMouseDown = 3,
|
||||||
@@ -43,6 +77,7 @@ EventType :: enum UInteger {
|
|||||||
Pressure = 34,
|
Pressure = 34,
|
||||||
DirectTouch = 37,
|
DirectTouch = 37,
|
||||||
ChangeMode = 38,
|
ChangeMode = 38,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EventPhase :: distinct bit_set[EventPhaseFlag; UInteger]
|
EventPhase :: distinct bit_set[EventPhaseFlag; UInteger]
|
||||||
|
|||||||
Reference in New Issue
Block a user