mach/libs
Lue eed2be4591 glfw: refactor getError and related functions
`getError()` now returns a struct `Error` containing `error_code` and
`description`. Rationale: retrieving the error code with the previous
implementation of `getError()` caused `getErrorString()` to return
null (the reverse is also true). The new implementation allows both
values to be retrieved at once.

The previous `getError()` function has been renamed to
`getErrorCode()` to reflect the fact that it returns a simple Zig
error rather than the `Error` struct. The error set returned by
`getErrorCode()` is now named `ErrorCode` rather than `Error`.

The behavior of the `getError()` family of functions clearing the
stored error is unchanged. However, since all code that used
`defer glfw.getError() catch {}` to explicitly clear errors had to be
refactored, a new `glfw.clearError()` function that returns void is
now available to make this operation more explicit.

Additionally, `mustGetError()` is now `mustGetErrorCode()`, and new
functions `mustGetError()` and `mustGetErrorString()` have been added
which wrap `getError()` and `getErrorString()` but panic if no error
is actually available.

Tests and API documentation had to be refactored across all of
`mach/glfw`. This commit also takes the opportunity to skip tests
involving window creation on CI so that other tests may still execute
normally.
2023-01-10 20:52:41 -07:00
..
basisu Revert "all: build: fix sdkPath for relative @src.file / fix autocompletion with ZLS / IDEs (#661)" 2023-01-10 01:57:52 -07:00
earcut Revert "all: build: fix sdkPath for relative @src.file / fix autocompletion with ZLS / IDEs (#661)" 2023-01-10 01:57:52 -07:00
ecs Revert "all: build: fix sdkPath for relative @src.file / fix autocompletion with ZLS / IDEs (#661)" 2023-01-10 01:57:52 -07:00
freetype Revert "all: build: fix sdkPath for relative @src.file / fix autocompletion with ZLS / IDEs (#661)" 2023-01-10 01:57:52 -07:00
gamemode Revert "all: build: fix sdkPath for relative @src.file / fix autocompletion with ZLS / IDEs (#661)" 2023-01-10 01:57:52 -07:00
glfw glfw: refactor getError and related functions 2023-01-10 20:52:41 -07:00
gpu Revert "all: build: fix sdkPath for relative @src.file / fix autocompletion with ZLS / IDEs (#661)" 2023-01-10 01:57:52 -07:00
gpu-dawn gpu-dawn: update to latest binary release 2023-01-10 09:35:27 +00:00
model3d Revert "all: build: fix sdkPath for relative @src.file / fix autocompletion with ZLS / IDEs (#661)" 2023-01-10 01:57:52 -07:00
sysaudio Revert "all: build: fix sdkPath for relative @src.file / fix autocompletion with ZLS / IDEs (#661)" 2023-01-10 01:57:52 -07:00
sysjs Revert "all: build: fix sdkPath for relative @src.file / fix autocompletion with ZLS / IDEs (#661)" 2023-01-10 01:57:52 -07:00