summaryrefslogtreecommitdiff
path: root/starling/system.scm
diff options
context:
space:
mode:
Diffstat (limited to 'starling/system.scm')
-rw-r--r--starling/system.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/starling/system.scm b/starling/system.scm
new file mode 100644
index 0000000..f498aa4
--- /dev/null
+++ b/starling/system.scm
@@ -0,0 +1,15 @@
+(define-module (starling system)
+ #:use-module (oop goops)
+ #:use-module (sdl2)
+ #:use-module (sdl2 video)
+ #:export (elapsed-time
+ current-window
+ current-window-size))
+
+(define (elapsed-time)
+ (sdl-ticks))
+
+(define current-window (make-parameter #f))
+
+(define (current-window-size)
+ (window-size (current-window)))