libmach: update API, exposes init, update, and deinit functions

This commit is contained in:
Zachary Huang 2022-07-19 00:31:29 -04:00 committed by Stephen Gutekanst
parent d194dafb79
commit 77aecbe806
6 changed files with 166 additions and 138 deletions

View file

@ -4,8 +4,9 @@ Build the `libmach` dynamic library by running `make` (or running `zig build` in
The resulting binary should be located in `libmach/build/`.
Test the functionality of `libmach` using `make test_c` and `make test_lisp`.
These commands use C and Lisp to call into `libmach`, and both should show a blank window for exactly 1 second.
These commands use C and Lisp to call into `libmach`, and both should show a blank window for 5 seconds.
If you resize the window, it should print the new dimensions to the standard output.
Note: `make test_lisp` requires a relatively recent version of Steel Bank Common Lisp (`sbcl`) to be installed.
Note: `make test_lisp` requires a relatively recent version of Steel Bank Common Lisp (`sbcl`) to be installed, plus Quicklisp.
You can find the Zig source code for `libmach` in `src/bindings.zig`.
You can find the Zig source code for `libmach` in `src/platform/libmach.zig`.