diff options
author | David Thompson <dthompson2@worcester.edu> | 2024-04-10 14:49:03 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2024-04-10 14:49:03 -0400 |
commit | 6696a0b5fcb1b17895285d80d9636defb2df3f9d (patch) | |
tree | 2cce306afcd7776925f725a382ae1a834513636c /strigoform/window.scm | |
parent | 20b4e7c566cd268f8fafd3e2d3846513e31949e7 (diff) |
Sloppily refactor into modules.
Diffstat (limited to 'strigoform/window.scm')
-rw-r--r-- | strigoform/window.scm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/strigoform/window.scm b/strigoform/window.scm new file mode 100644 index 0000000..87225ef --- /dev/null +++ b/strigoform/window.scm @@ -0,0 +1,24 @@ +(library (strigoform window) + (export current-window + window-inner-width + window-inner-height + request-animation-frame + timeout) + (import (scheme base) + (hoot ffi)) + + (define-foreign current-window + "window" "get" + -> (ref null extern)) + (define-foreign window-inner-width + "window" "innerWidth" + (ref null extern) -> i32) + (define-foreign window-inner-height + "window" "innerHeight" + (ref null extern) -> i32) + (define-foreign request-animation-frame + "window" "requestAnimationFrame" + (ref null extern) -> none) + (define-foreign timeout + "window" "setTimeout" + (ref null extern) f64 -> i32)) |