summaryrefslogtreecommitdiff
path: root/doc/guile-sdl2.texi
blob: 039e5e86f49ca3edd17c44382618299ec53401b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
\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

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.freenode.net}, 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