From ad2a71bd5d6d984fc72a5474c55c7fb052cd694c Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 22 Dec 2015 14:05:58 -0500 Subject: window: Allow unspecified and centered window positions. * sdl2/bindings.scm (SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_UNDEFINED): New variables. * sdl2/video.scm (make-window): Accept #f and 'center' as valid coordinates for undefined and centered positioning, respectively. Use an undefined position by default. --- sdl2/bindings.scm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sdl2/bindings.scm') diff --git a/sdl2/bindings.scm b/sdl2/bindings.scm index 79fbf92..eb7689e 100644 --- a/sdl2/bindings.scm +++ b/sdl2/bindings.scm @@ -141,6 +141,9 @@ RETURN-TYPE and accept arguments of ARG-TYPES." (define SDL_WINDOW_ALLOW_HIGHDPI #x00002000) (define SDL_WINDOW_MOUSE_CAPTURE #x00004000) +(define-public SDL_WINDOWPOS_CENTERED 805240832) +(define-public SDL_WINDOWPOS_UNDEFINED 536805376) + (define-foreign sdl-create-window '* "SDL_CreateWindow" (list '* int int int int uint32)) -- cgit v1.2.3