From 6c28e028509722c27078966a2c94ddb9d0090ca7 Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Tue, 1 Dec 2020 16:46:47 +0100 Subject: video: Add more bindings. * sdl2/bindings.scm (sdl-window-get-minimum-size) (sdl-window-get-maximum-size, sdl-window-set-minimum-size) (sdl-window-set-maximum-size, sdl-window-set-resizable): New procedures. * sdl2/video.scm (window-minimum-size, window-maximum-size) (set-window-minimum-size!, set-window-maximum-size!) (set-window-resizable!): New procedures. * doc/api.texi: Document new (sdl2 video) bindings. --- doc/api.texi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'doc') diff --git a/doc/api.texi b/doc/api.texi index a158795..ef7d702 100644 --- a/doc/api.texi +++ b/doc/api.texi @@ -96,6 +96,20 @@ Return the title for @var{window}. Return the dimensions of @var{window}. @end deffn +@deffn {Procedure} window-minimum-size window +Return the minimal dimensions, that @var{window} should take. +Note, that SDL does not always enforce this restriction, so you might end up +with a window-size, that is actually smaller than the value returned by this +function. +@end deffn + +@deffn {Procedure} window-maximum-size window +Return the maximal dimensions, that @var{window} should take. +Note, that SDL does not always enforce this restriction, so you might end up +with a window-size, that is actually larger than the value returned by this +function. +@end deffn + @deffn {Procedure} window-position window Return the position of @var{window} on the display. @end deffn @@ -152,6 +166,21 @@ Set the dimensions of @var{window} to @var{size}, a two-element list of (width,height) coordinates measured in pixels. @end deffn +@deffn {Procedure} set-window-minimum-size! window width height +Set the minimum dimensions of @var{window} to @var{width} x +@var{height} pixels. +@end deffn + +@deffn {Procedure} set-window-maximum-size! window width height +Set the maximum dimensions of @var{window} to @var{width} x +@var{height} pixels. +@end deffn + +@deffn {Procedure} set-window-resizable! window resizable? +If @var{resizable} is @code{#t}, allow @var{window} to be resized, +otherwise disable resizing. +@end deffn + @deffn {Procedure} set-window-fullscreen! window fullscreen? [#:desktop?] Toggle fullscreen mode on/off for @var{window}. If @var{fullscreen?}, fullscreen mode is activated, otherwise it is deactivated. If -- cgit v1.2.3