diff options
author | Leo Prikler <leo.prikler@student.tugraz.at> | 2021-01-15 21:05:43 +0100 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2021-01-16 19:40:46 -0500 |
commit | dbc5984dc1360944f4dd15f9d846829fab99f04d (patch) | |
tree | 026a5c23ce56c2308ad963356bae8b29fcec5d3d /doc | |
parent | 5b965d180a1f536affd51ffc2b51d5e90fbc362d (diff) |
Add support for hints.
* sdl2/bindings.scm (SDL_HINT_DEFAULT, SDL_HINT_NORMAL, SDL_HINT_OVERRIDE)
(sdl-set-hint-with-priority, sdl-get-hint): New variables.
* sdl2/hints.scm: New file.
* doc/api.texi: Add Hints.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api.texi | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/api.texi b/doc/api.texi index 3c4e645..288d0a6 100644 --- a/doc/api.texi +++ b/doc/api.texi @@ -10,6 +10,7 @@ * Images:: Loading and saving images. * Sound:: Sound effects and music. * Fonts:: Truetype and bitmap font rendering. +* Hints:: Getting and setting configuration hints. @end menu @node Basics @@ -1648,3 +1649,26 @@ Render @var{text}, a UTF-8 encoded string, using @var{font} and @var{color}, the foreground color, and return a high-quality alpha-blended surface containing the results. @end deffn + +@node Hints +@section Hints + +@example +(use-modules (sdl2 hints)) +@end example + +@deffn {Procedure} get-hint hint +Get the string value of @var{hint} or @code{#f} if if @var{hint} is unset. +@end deffn + +@deffn {Procedure} set-hint! hint value [priority] +Set @var{hint} to @var{value} at priority level @var{priority}. +@var{priority} can be one of the symbols @code{default}, @code{normal} or +@code{override} and defaults to @code{normal}. +@var{value} will automatically be converted to a string if it is a boolean +or a number. +@end deffn + +Inside SDL2, the macro @code{SDL_HINT_SOME_HINT} corresponds to the +environment variable @env{SDL_SOME_HINT}. In Guile-SDL2, this hint would be +represented by the symbol @code{some-symbol.} |