Commit graph

44 commits

Author SHA1 Message Date
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
3e466da662 glfw: add glfw.key.getName
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-23 19:33:33 -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
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
06fefd4026 glfw: rename joystick -> Joystick; add Joystick.getGamepadState
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-22 00:35:34 -07:00
Stephen Gutekanst
fcbfe70c66 glfw: add glfw.postEmptyEvent
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-16 18:39:57 -07:00
Stephen Gutekanst
6a124e35f9 glfw: add glfw.waitEvents, glfw.waitEventsTimeout
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-16 18:39:57 -07:00
Stephen Gutekanst
522f26e15f glfw: add glfw.pollEvents
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-16 18:39:57 -07:00
Stephen Gutekanst
41c2ef44c1 glfw: add TODOs for tracking 100% GLFW API coverage
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-16 18:39:57 -07:00
Stephen Gutekanst
4f1c6d1b58 glfw: add Image type
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-20 21:00:05 -07:00
Stephen Gutekanst
a9446f4ed6 glfw: add Window.shouldClose
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-18 21:57:46 -07:00
Stephen Gutekanst
badc8939b5 glfw: add Window.destroy
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-18 21:45:25 -07:00
Stephen Gutekanst
04a213b411 glfw: cleanup two tests
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-18 21:37:05 -07:00
Stephen Gutekanst
c2af312200 glfw: use Window.create in basic test
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-18 21:36:14 -07:00
Stephen Gutekanst
441d8d7928 glfw: add Window.defaultHints
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-18 17:47:07 -07:00
Stephen Gutekanst
b5d1ebd1cd glfw: window open test is optional (cannot open windows on CI)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-18 15:38:53 -07:00
Stephen Gutekanst
ceabcec7a3 glfw: add GammaRamp type
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 21:29:51 -07:00
Stephen Gutekanst
72f09b4f32 glfw: fix and test VideoMode getters
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 20:56:48 -07:00
Stephen Gutekanst
5238e52d76 glfw: add Monitor.setGamma; return concrete Error types
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 20:50:41 -07:00
Stephen Gutekanst
b76e8d02f2 glfw: deduplicate @cImport for type equivalence
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 20:14:09 -07:00
Stephen Gutekanst
26e0db2064 glfw: always check init errors
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 13:59:26 -07:00
Stephen Gutekanst
5f4fb8b400 glfw: only keep test window open for 100ms
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 17:09:28 -07:00
Stephen Gutekanst
8ade50719d glfw: correctly test Monitor implementation
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 16:56:58 -07:00
Stephen Gutekanst
04cbfb2e1e glfw: add monitor.getAll support
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 16:36:57 -07:00
Stephen Gutekanst
1cedf40671 glfw: make init inline
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 16:35:42 -07:00
Stephen Gutekanst
bda78aca74 glfw: add getVersionString
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 16:00:28 -07:00
Stephen Gutekanst
c1dcabb72b glfw: add initHint function
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 15:50:35 -07:00
Stephen Gutekanst
2bb3b934e1 glfw: add terminate function
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 15:24:45 -07:00
Stephen Gutekanst
f533747fa8 glfw: add init function
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 15:07:06 -07:00
Stephen Gutekanst
4b5f94c4ea glfw: add C -> Zig error translation
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 14:27:34 -07:00
Stephen Gutekanst
61eafbf69a glfw: add general constants
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 13:26:11 -07:00
Stephen Gutekanst
d0be590230 glfw: add gamepad button IDs
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 12:31:53 -07:00
Stephen Gutekanst
98280d3be7 glfw: add gamepad axis
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 12:31:22 -07:00
Stephen Gutekanst
fcc289a0eb glfw: add joystick IDs
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 12:24:08 -07:00
Stephen Gutekanst
3b2f39daaa glfw: add mouse button IDs
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 12:20:32 -07:00
Stephen Gutekanst
a5cc868643 glfw: add modifier key flags
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 12:15:49 -07:00
Stephen Gutekanst
f8a6f2fd74 glfw: add keyboard key ID constants
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 12:11:12 -07:00
Stephen Gutekanst
73055427ad glfw: add joystick hat states
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 11:41:51 -07:00
Stephen Gutekanst
6308a2f8dd glfw: move constants into separate modules
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 11:34:18 -07:00
Stephen Gutekanst
166d621797 glfw: add key/button action constants
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 11:31:02 -07:00
Stephen Gutekanst
c0c7305738 glfw: add version constants
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 11:21:51 -07:00
Stephen Gutekanst
0a7e8d341c
CI: add macOS testing pipeline (#2)
* CI: add macOS testing pipeline
* glfw: use hidden window

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 10:57:37 -07:00
Stephen Gutekanst
bba27cf1aa glfw: macOS cross compilation with automatic setup
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-10 01:01:51 -07:00
Stephen Gutekanst
6e5ff09e55 glfw: add basic example, building+linking on macOS is working
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-06 20:53:10 -07:00