Stephen Gutekanst
7cc850982f
glfw: fix failing Mod bitmask tests, make fromInt/toInt work on non-6-bit integers
...
Helps hexops/mach#37
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-30 20:06:03 -07:00
Stephen Gutekanst
60eeae4904
glfw: make Window.setKeyCallback use Mods packed struct directly
...
Helps hexops/mach#37
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-30 20:06:03 -07:00
Stephen Gutekanst
ab01edee1c
glfw: glfw.mod.Mods -> glfw.Mods, etc. & fix test compilation
...
Helps hexops/mach#37
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-30 20:06:03 -07:00
Stephen Gutekanst
32fa90eca9
glfw: ziggify Joystick hat bitmasks
...
Helps hexops/mach#37
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-30 20:06:03 -07:00
Stephen Gutekanst
210e12a437
glfw: ziggify gamepad button enumerations
...
Helps hexops/mach#37
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-30 20:06:03 -07:00
Stephen Gutekanst
2154ee5aea
glfw: ziggify gamepad action enumerations
...
Helps hexops/mach#37
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-30 20:06:03 -07:00
Stephen Gutekanst
8a14d56fc3
glfw: ziggify all Action enums
...
Make the GLFW action enumerations proper Zig enums so one can use `.Name` syntax, etc.
Helps #37
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-29 21:27:20 -07:00
Stephen Gutekanst
ed10bebf99
glfw: improve panic message for glfw.getInstanceProcAddress
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-29 17:13:21 -07:00
Stephen Gutekanst
ac4bfe5e0b
glfw: make glfw.getProcAddress conform to GLFW C ABI
...
Having `glfw.getProcAddress` conform to the GLFW C ABI is important as it is often
likely to be passed into libraries which expect exactly that ABI for OpenGL function
loading.
Fixes hexops/mach#52
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-29 17:13:21 -07:00
Stephen Gutekanst
8c31529f8a
glfw: make glfw.getInstanceProcAddress conform to GLFW C ABI
...
Having `glfw.getInstanceProcAddress` conform to the GLFW C ABI is important as it is often
likely to be passed into libraries which expect exactly that ABI, e.g. zig-vulkan.
Fixes hexops/mach#49
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-29 16:15:42 -07:00
Stephen Gutekanst
f911a0a22f
glfw: correct clipboard test
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-24 08:55:26 -07:00
Stephen Gutekanst
ebdf773c8e
glfw: make clipboard test fault-tolerent
...
Fixes #45
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-24 08:48:12 -07:00
Aksel Hjerpbakk
1a3f391891
glfw: enums ( #41 )
...
* move key values in an enum
* bitmask for key modifiers
* export Key type and move key fns
instead of exporting the key file, export Key enum.
functions related to the Key type are moved into the enum as well so that they get exported with the type
2021-10-24 06:23:20 -07:00
Stephen Gutekanst
388f3aa659
glfw: correct typo in constant name
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 22:12:56 -07:00
Stephen Gutekanst
d2d1f0b222
glfw: set input mode supported on all platforms in test
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -07:00
Stephen Gutekanst
d23cd8e400
glfw: add glfw.Window.getInputMode
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -07:00
Stephen Gutekanst
79a2784093
glfw: add glfw.Window.setInputMode
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -07:00
Stephen Gutekanst
53519d94af
glfw: add glfw.Window.getKey
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -07:00
Stephen Gutekanst
77e9396888
glfw: add glfw.Window.getMouseButton
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -07:00
Stephen Gutekanst
9aaa8702a8
glfw: add glfw.Window.getCursorPos
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -07:00
Stephen Gutekanst
493a444ae5
glfw: add glfw.Window.setCursorPos
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -07:00
Stephen Gutekanst
d50d84f935
glfw: add Window.setCursor
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -07:00
Stephen Gutekanst
bad1b9f246
glfw: correct test order
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -07:00
Stephen Gutekanst
888cd5ade6
glfw: add glfw.Window.setKeyCallback
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -07:00
Stephen Gutekanst
041dad6586
glfw: add glfw.Window.setCharCallback
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -07:00
Stephen Gutekanst
0b84cfd3c4
glfw: add glfw.Window.setMouseButtonCallback
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -07:00
Stephen Gutekanst
2bdc71518b
glfw: add glfw.Window.setCursorPosCallback
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -07:00
Stephen Gutekanst
dd6242ee24
glfw: add glfw.Window.setCursorEnterCallback
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -07:00
Stephen Gutekanst
f39a09b06e
glfw: add glfw.Window.setScrollCallback
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -07:00
Stephen Gutekanst
3d2eed7a81
glfw: add glfw.Window.setDropCallback
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -07:00
Stephen Gutekanst
8df9c19e5b
glfw: add glfw.key.getScancode
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -07:00
Stephen Gutekanst
3e466da662
glfw: add glfw.key.getName
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -07:00
Stephen Gutekanst
6e3687e3aa
glfw: correct C import
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -07:00
Stephen Gutekanst
da5200359f
glfw: fix file case sensitivity
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-22 00:35:34 -07:00
Stephen Gutekanst
9d95c18d4c
glfw: add glfw.rawMouseMotionSupported
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-22 00:35:34 -07:00
Stephen Gutekanst
0f6efa4bc0
glfw: add enum for standard cursor shapes
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-22 00:35:34 -07:00
Stephen Gutekanst
b50cbba83f
glfw: add Cursor.destroy
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-22 00:35:34 -07:00
Stephen Gutekanst
d97a1b5669
glfw: add Cursor.createStandard
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-22 00:35:34 -07:00
Stephen Gutekanst
509e7f3b4b
glfw: add Cursor.create
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-22 00:35:34 -07:00
Stephen Gutekanst
7d9b626b11
glfw: move remaining input TODOs to final locations
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-22 00:35:34 -07:00
Stephen Gutekanst
b0442c6a47
glfw: enumerate TODOs
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-22 00:35:34 -07:00
Stephen Gutekanst
089b70b678
glfw: add Joystick.getGUID
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-22 00:35:34 -07:00
Stephen Gutekanst
dc608ee6a8
glfw: add Joystick.getName
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-22 00:35:34 -07:00
Stephen Gutekanst
02c26bde30
glfw: add Joystick.getHats
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-22 00:35:34 -07:00
Stephen Gutekanst
20ce5c841b
glfw: rename Joystick.isPresent -> Joystick.present to match GLFW
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-22 00:35:34 -07:00
Stephen Gutekanst
e35c22f5e7
glfw: add Joystick.getButtons
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-22 00:35:34 -07:00
Stephen Gutekanst
269b4cacc8
glfw: add Joystick.getAxes
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-22 00:35:34 -07:00
Stephen Gutekanst
b040116b4c
glfw: add Joystick.isPresent
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-22 00:35:34 -07:00
Stephen Gutekanst
8a72ea7fc3
glfw: add Joystick.setCallback
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-22 00:35:34 -07:00
Stephen Gutekanst
fb98715d9e
glfw: add Joystick.setUserPointer, Joystick.getUserPointer
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-22 00:35:34 -07:00