blob: 0d66e7daf49313c36efab00758ba03a539db3917 (
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
|
@menu
* Basics:: Initialization and other basic things.
* Window Management:: Working with the window system.
* Input:: Keyboard, mouse, joystick input.
* Events:: Asynchronous event handling.
* Surfaces:: Software rendering.
* Rendering:: Hardware accelerated rendering.
* Images:: Loading and saving images.
* Sound:: Sound effects and music.
* Fonts:: Truetype and bitmap font rendering.
@end menu
@node Basics
@section Basics
@example
(use-modules (sdl2))
@end example
@deffn {Scheme Procedure} sdl-init [@var{subsystems}]
Initialize the SDL library. This must be called before using any
other SDL procedure.
@var{subsystems} is an optional list of symbols that specifies the
subsystems to initialize. All subsystems are initialized by default.
The possible flags are @code{timer}, @code{audio}, @code{video},
@code{haptic}, @code{game-controller}, and @code{events}.
@end deffn
@deffn {Scheme Procedure} sdl-quit
Quit all activated SDL subsystems. This procedure should be called
upon all exit conditions.
@end deffn
@deffn {Scheme Procedure} sdl-version
Return a three element list containing the major, minor, and patch
version of the linked SDL library.
@end deffn
@deffn {Scheme Procedure} sdl-ticks
Return the number of milliseconds since the SDL library was
initialized.
@end deffn
@node Window Management
@section Window Management
@menu
* Windows:: Window manipulation.
* OpenGL:: OpenGL contexts.
@end menu
@example
(use-modules (sdl2 video))
@end example
@node Windows
@subsection Windows
@node OpenGL
@subsection OpenGL
@node Input
@section Input
@menu
* Keyboard:: Keyboard input.
* Mouse:: Mouse input.
* Joysticks:: Joystick input.
* Game Controllers:: Game controller input.
@end menu
@node Keyboard
@subsection Keyboard
@node Mouse
@subsection Mouse
@node Joysticks
@subsection Joysticks
@example
(use-modules (sdl2 input joystick))
@end example
@node Game Controllers
@subsection Game Controllers
@example
(use-modules (sdl2 input game-controller))
@end example
@node Events
@section Events
@example
(use-modules (sdl2 events))
@end example
@node Surfaces
@section Surfaces
@example
(use-modules (sdl2 input surface))
@end example
@node Rendering
@section Rendering
@example
(use-modules (sdl2 input render))
@end example
@node Images
@section Images
@example
(use-modules (sdl2 input image))
@end example
@node Sound
@section Sound
@example
(use-modules (sdl2 input mixer))
@end example
@node Fonts
@section Fonts
@example
(use-modules (sdl2 input ttf))
@end example
|