\input texinfo @c -*-texinfo-*- @c %**start of header @setfilename guile-sdl2.info @settitle Guile-SDL2 @c %**end of header @copying Copyright @copyright{} 2016, 2017, 2018, 2019 David Thompson @email{davet@@gnu.org} @quotation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. A copy of the license is also available from the Free Software Foundation Web site at @url{http://www.gnu.org/licenses/fdl.html}. @end quotation @dircategory The Algorithmic Language Scheme @direntry * Guile-SDL2: (guile-sdl2). SDL2 bindings for Guile. @end direntry The document was typeset with @uref{http://www.texinfo.org/, GNU Texinfo}. @end copying @titlepage @title Guile-SDL2 @subtitle Using Guile Scheme bindings for SDL2 @author David Thompson @page @vskip 0pt plus 1filll @insertcopying @end titlepage @c Output the table of the contents at the beginning. @contents @ifnottex @node Top @top Guile-SDL2 @insertcopying @end ifnottex @c Generate the nodes for this menu with `C-c C-u C-m'. @menu * Introduction:: About Guile-SDL2. * Installation:: Installing Guile-SDL2. * API Reference:: High-level Scheme interfaces to SDL2. * Contributing:: Guidelines for hacking Guile-SDL2. * Copying This Manual:: The GNU Free Documentation License and you! * Index:: @end menu @c Update all node entries with `C-c C-u C-n'. @c Insert new nodes with `C-c C-c n'. @node Introduction @chapter Introduction Guile-SDL2 provides both low-level and high-level Guile Scheme bindings to the Simple DirectMedia Layer version 2.0 C library. The bindings are written in pure Scheme by using Guile's foreign function interface. In addition to the SDL2 core library, bindings are also provided for the SDL2_image, SDL2_mixer, and SDL2_ttf add-on libraries. While Guile-SDL2 does provide direct, low-level bindings for the SDL2 C API, its main feature is exposing high-level interfaces that Scheme programmers will find comfortable to use, hiding away the ugly, foreign C details. This manual will cover only the high-level API. @pxref{API Reference} As of this writing, the bindings are useful, but @emph{incomplete}. If you find an SDL2 feature that you cannot use with Guile-SDL2, let us know and maybe send a patch! @pxref{Contributing} @node Installation @chapter Installation Guile-SDL2 is available for download from its website at @url{dthompson.us/projects/guile-sdl2.html}. This section describes the software requirements of Guile-SDL2, as well as how to install it. The build procedure for Guile-SDL2 is the same as for GNU software packages, and is not covered here. Please see the files @file{README.org} and @file{INSTALL.org} for additional details. @menu * Requirements:: Software needed to build and run Guile-SDL2. @end menu @node Requirements @section Requirements Guile-SDL2 depends on the following packages: @itemize @item @url{https://gnu.org/software/guile, GNU Guile}, version 2.0.11 or later; @item @url{https://libsdl.org, SDL2}, version 2.0.0 or later; @end itemize Guile-SDL2 has the following optional dependencies: @itemize @item @url{https://www.libsdl.org/projects/SDL_image, SDL2_image}, version 2.0.0 or later; @item @url{https://www.libsdl.org/projects/SDL_mixer, SDL2_mixer}, version 2.0.0 or later; @item @url{https://www.libsdl.org/projects/SDL_ttf, SDL2_ttf}, version 2.0.0 or later; @end itemize @node API Reference @chapter API Reference @include api.texi @node Contributing @chapter Contributing @menu * Getting the Source:: Getting good with Git. * Submitting Patches:: Patches welcome! * Chat:: Let's talk! @end menu @node Getting the Source @section Getting the Source Guile-SDL2 is developed using the Git version control system. The repository can be cloned with the following command: @example git clone https://git.dthompson.us/guile-sdl2.git @end example To build the source code from a Git checkout, run the following: @example ./bootstrap ./configure make @end example To start a Guile REPL with a pre-configured load path for using Guile-SDL2, use the @code{pre-inst-env} script: @example ./pre-inst-env guile @end example @node Submitting Patches @section Submitting Patches Patches generated by @code{git format-patch} may be sent to @email{davet@@gnu.org}. Thanks in advance! @node Chat @section Chat The maintainer of this library hangs out in the @code{#guile} channel on @url{irc.libera.chat}, so help and general discussion may be found there. @node Copying This Manual @appendix Copying This Manual @menu * GNU Free Documentation License:: License for copying this manual. @end menu @c Get fdl.texi from http://www.gnu.org/licenses/fdl.html @node GNU Free Documentation License @section GNU Free Documentation License @include fdl.texi @node Index @unnumbered Index @syncodeindex tp fn @syncodeindex vr fn @printindex fn @bye @c guile-sdl2.texi ends here