From b8aaa96201a6716b7ad5617c0c2987e5def66cb4 Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Sun, 27 Jun 2021 19:23:20 +0200 Subject: Add support for SDL_SetWindowIcon. * sdl/bindings.scm (sdl-set-window-icon): New variable. * sdl/video.scm (set-window-icon!): New variable. * doc/api.texi (Windows): Document it. --- sdl2/video.scm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sdl2/video.scm') diff --git a/sdl2/video.scm b/sdl2/video.scm index a481183..0db5314 100644 --- a/sdl2/video.scm +++ b/sdl2/video.scm @@ -50,6 +50,7 @@ restore-window! set-window-border! set-window-title! + set-window-icon! set-window-position! set-window-size! set-window-minimum-size! @@ -231,6 +232,12 @@ the border." (ffi:sdl-set-window-title (unwrap-window window) (string->pointer title))) +(define (set-window-icon! window icon) + "Set the icon of WINDOW to the surface ICON." + (ffi:sdl-set-window-icon (unwrap-window window) + ((@@ (sdl2 surface) unwrap-surface) icon))) + + (define (set-window-position! window x y) "Set the position of WINDOW to (X, Y)." (ffi:sdl-set-window-position (unwrap-window window) x y)) -- cgit v1.2.3