Commit graph

47 commits

Author SHA1 Message Date
PiergiorgioZagaria
f92afebcb3 glfw: update system_sdk for wayland and catch wayland test errors 2022-06-29 20:54:04 -07:00
PiergiorgioZagaria
7bb877bd55
glfw: support compiling with stage2 (-fno-stage1) (#365) 2022-06-24 10:12:45 -07:00
Stephen Gutekanst
1dd27fd904 glfw: update monitor API to glfw@master
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Lee Cannon
6f32a338c0 glfw: use comptime magic to remove InternalUserPointer and associated overhead 2022-02-11 15:13:58 -07:00
Lee Cannon
8d2a4cd8d2 glfw: glfwGetMonitors can return null to signify no monitors 2022-02-11 15:09:09 -07:00
Lee Cannon
bc8ce57e53 glfw: document why unreachable is valid 2022-02-11 15:09:09 -07:00
Stephen Gutekanst
0cdac6c68a Fix minor regressions introduced in 3e79a12
3e79a12f3d

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-02-08 20:21:56 -07:00
Lee Cannon
2e9347399d glfw: dont use @errSetCast 2022-02-08 19:58:52 -07:00
Lee Cannon
3e79a12f3d glfw: dont call getError unless we need to 2022-02-08 19:57:20 -07:00
iddev5
cd82da72be glfw: Update function docs in Monitor and vulkan to match glfw 3.3.6 2021-12-23 13:01:45 -07:00
Ali Chraghi
595cf48450
glfw: replace isize, usize with i32, u32 where appropriate (#126)
Fixes hexops/mach#114
2021-12-14 09:20:14 -07:00
InKryption
3648d6b9c4
glfw: Denormalize errors (#115)
Closes hexops/mach#96

Co-authored-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-06 21:52:15 -07:00
BratishkaErik
784aa40093 glfw: update system_sdk.zig to latest Zig master 2021-12-06 20:03:38 -08:00
InKryption
1d648c2256 glfw: Eliminate Error.InvalidValue 2021-11-26 20:50:38 -07:00
InKryption
b35a7b4fad glfw: Change error unions into normal returns, in accordance with the new guarantee to never encounter 'GLFW_NOT_INITIALIZED', and update tests 2021-11-22 12:59:11 -07:00
InKryption
d9e2505b59 glfw: amend and update various TODOs pertaining to force-init changes 2021-11-22 12:59:11 -07:00
InKryption
ef7ada052c glfw: Revert error denormalization 2021-11-22 12:59:11 -07:00
InKryption
44fee8f1f1 glfw: force init error type work around 2021-11-22 12:59:11 -07:00
InKryption
fb115b79e5 glfw: force init in Monitor.zig 2021-11-22 12:59:11 -07:00
Silver
673ce14acf glfw: remove [*c] pointers from api and return lengthed strings when possible 2021-11-16 07:12:02 -07:00
InKryption
f00367e696 glfw: Update tests in all other files to reflect changes made to glfw.init 2021-11-10 11:42:24 -07:00
Stephen Gutekanst
f1644d2e59 glfw: make monitor/joystick events a proper enum
Helps hexops/mach#37

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-10-30 20:06:03 -07:00
Stephen Gutekanst
a690b84732 glfw: better handle Wayland limitations
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-23 14:05:54 -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
4fa50d273b glfw: add Monitor.setGammaRamp
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 21:57:02 -07:00
Stephen Gutekanst
349462cb77 glfw: add Monitor.getGammaRamp
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 21:37:53 -07:00
Stephen Gutekanst
27d3117024 glfw: move Monitor method for consistency
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 21:30:52 -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
ee11697769 glfw: add Monitor.getVideoMode
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 20:43:37 -07:00
Stephen Gutekanst
c6e8bce219 glfw: fix and test Monitor.getVideoModes
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 20:15:40 -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
74e2bddf93 glfw: add VideoMode type; add Monitor.getVideoModes
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 19:57:07 -07:00
Stephen Gutekanst
0af761d046 glfw: clarify Monitor.setCallback docs
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 17:23:01 -07:00
Stephen Gutekanst
c5b89fef2e glfw: fix Monitor.getUserPointer alignment
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 17:18:12 -07:00
Stephen Gutekanst
9cac08b3b9 glfw: add Monitor.setCallback
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 15:31:31 -07:00
Stephen Gutekanst
30debe452c glfw: correct Monitor.getAll error checking; fix tests
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 14:06:19 -07:00
Stephen Gutekanst
309b71d600 glfw: correctly check for Monitor.getAll errors
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 14:02:07 -07:00
Stephen Gutekanst
6cfac34405 glfw: inline Monitor functions
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 14:00:57 -07:00
Stephen Gutekanst
003a1db2e6 glfw: add Monitor.setUserPointer, Monitor.getUserPointer
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 12:58:11 -07:00
Stephen Gutekanst
d57a53df49 glfw: add Monitor.getName function
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 12:58:11 -07:00
Stephen Gutekanst
57c9ae9a40 glfw: add Monitor.getContentScale
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 12:58:11 -07:00
Stephen Gutekanst
213f4bf786 glfw: add Monitor.getPhysicalSize
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-17 12:58:11 -07:00
Stephen Gutekanst
d9797481d2 glfw: add monitor.getWorkarea
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 17:07:48 -07:00
Stephen Gutekanst
cfcd97d167 glfw: add Monitor.getPos
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 16:57:50 -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
10eb3b5680 glfw: add monitors.getPrimary
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-07-16 16:42:03 -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