Commit | Line | Data |
9b6fa14c |
1 | <div class="pod"> |
2 | <!-- INDEX START --> |
3 | <h3 id="TOP">Index</h3> |
4 | |
5 | <ul><li><a href="#NAME">NAME</a></li> |
6 | <li><a href="#SYNOPSIS">SYNOPSIS</a></li> |
7 | <li><a href="#DESCRIPTION">DESCRIPTION</a></li> |
8 | <li><a href="#The_SDL_Perl_2009_Development_Team">The SDL Perl 2009 Development Team</a> |
9 | <ul><li><a href="#Documentation">Documentation</a></li> |
10 | <li><a href="#Perl_Development">Perl Development</a></li> |
11 | <li><a href="#Maintainance">Maintainance </a></li> |
12 | </ul> |
13 | </li> |
14 | <li><a href="#MacOSX_Experimental_Usage">MacOSX Experimental Usage</a> |
15 | <ul><li><a href="#Running_SDL_Perl_Scripts_in_MacOSX">Running SDL Perl Scripts in MacOSX</a></li> |
16 | </ul> |
17 | </li> |
18 | <li><a href="#Functions_exported_by_SDL_pm">Functions exported by SDL.pm</a> |
19 | <ul><li><a href="#init_flags">init(flags) </a></li> |
20 | <li><a href="#init_subsystem_flags">init_subsystem(flags)</a></li> |
21 | <li><a href="#quit_subsystem_flags">quit_subsystem(flags)</a></li> |
22 | <li><a href="#quit">quit</a></li> |
23 | <li><a href="#was_init_flags">was_init(flags)</a></li> |
24 | <li><a href="#get_error">get_error()</a></li> |
25 | <li><a href="#set_error_error_need_to_be_coded">set_error(error) *need to be coded</a></li> |
26 | <li><a href="#error_code_need_to_be_coded">error(code) * need to be coded</a></li> |
27 | <li><a href="#clear_error_need_to_be_coded">clear_error() * need to be coded</a></li> |
28 | <li><a href="#load_object">load_object()</a></li> |
29 | <li><a href="#load_function">load_function()</a></li> |
30 | <li><a href="#unload_object">unload_object()</a></li> |
31 | <li><a href="#VERSION">VERSION()</a></li> |
32 | <li><a href="#version">version()</a></li> |
33 | <li><a href="#linked_version">linked_version</a></li> |
34 | <li><a href="#get_error-2">get_error()</a></li> |
35 | <li><a href="#delay_ms">delay(ms)</a> |
36 | </li> |
37 | </ul> |
38 | </li> |
39 | </ul><hr /> |
40 | <!-- INDEX END --> |
41 | |
42 | <h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p> |
43 | <div id="NAME_CONTENT"> |
44 | <p>SDL_perl - Simple DirectMedia Layer for Perl</p> |
45 | |
46 | </div> |
47 | <h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p> |
48 | <div id="SYNOPSIS_CONTENT"> |
49 | <pre> use SDL; |
50 | |
51 | </pre> |
52 | |
53 | </div> |
54 | <h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p> |
55 | <div id="DESCRIPTION_CONTENT"> |
56 | <p>SDL_perl is a package of perl modules that provides both functional and object orient |
57 | interfaces to the Simple DirectMedia Layer for Perl 5. This package does take some |
58 | liberties with the SDL API, and attempts to adhere to the spirit of both the SDL |
59 | and Perl. This document describes the low-level functional SDL_perl API. For the |
60 | object oriented programming interface please see the documentation provided on a |
61 | per class basis.</p> |
62 | |
63 | </div> |
64 | <h1 id="The_SDL_Perl_2009_Development_Team">The SDL Perl 2009 Development Team</h1><p><a href="#TOP" class="toplink">Top</a></p> |
65 | <div id="The_SDL_Perl_2009_Development_Team_C"> |
66 | |
67 | </div> |
68 | <h2 id="Documentation">Documentation</h2> |
69 | <div id="Documentation_CONTENT"> |
70 | <pre> Nick: magnet |
71 | |
72 | </pre> |
73 | |
74 | </div> |
75 | <h2 id="Perl_Development">Perl Development</h2> |
76 | <div id="Perl_Development_CONTENT"> |
77 | <pre> Nick: Garu |
78 | Name: Breno G. de Oliveira |
79 | |
80 | Nick: Dngor |
81 | Name: Rocco Caputo |
82 | |
83 | Nick: nferraz |
84 | Name: Nelson Ferraz |
85 | |
86 | Nick: acme |
87 | Name: Leon Brocard |
88 | |
89 | Nick: FROGGS |
90 | Name: Tobias Leich |
91 | |
92 | </pre> |
93 | |
94 | </div> |
95 | <h2 id="Maintainance">Maintainance </h2> |
96 | <div id="Maintainance_CONTENT"> |
97 | <pre> Nick: kthakore |
98 | Name: Kartik Thakore |
99 | |
100 | </pre> |
101 | |
102 | </div> |
103 | <h1 id="MacOSX_Experimental_Usage">MacOSX Experimental Usage</h1><p><a href="#TOP" class="toplink">Top</a></p> |
104 | <div id="MacOSX_Experimental_Usage_CONTENT"> |
105 | <p>Please get libsdl packages from Fink</p> |
106 | <pre> perl Build.PL |
107 | perl Build test |
108 | perl Build bundle |
109 | perl Build install |
110 | |
111 | </pre> |
112 | |
113 | </div> |
114 | <h2 id="Running_SDL_Perl_Scripts_in_MacOSX">Running SDL Perl Scripts in MacOSX</h2> |
115 | <div id="Running_SDL_Perl_Scripts_in_MacOSX_C"> |
116 | <p>First set the PERL5LIB environment variable to the dependencies of your script</p> |
117 | <pre> %export PERL5LIB=$PERL5LIB:./lib |
118 | |
119 | </pre> |
120 | <p>Use the SDLPerl executable made in the bundle and call your scripts</p> |
121 | <pre> %SDLPerl.app/Contents/MacOS/SDLPerl yourScript.pl |
122 | |
123 | </pre> |
124 | |
125 | </div> |
126 | <h1 id="Functions_exported_by_SDL_pm">Functions exported by SDL.pm</h1><p><a href="#TOP" class="toplink">Top</a></p> |
127 | <div id="Functions_exported_by_SDL_pm_CONTENT"> |
128 | |
129 | </div> |
130 | <h2 id="init_flags">init(flags) </h2> |
131 | <div id="init_flags_CONTENT"> |
132 | <p>As with the C language API, SDL_perl initializes the SDL environment through |
133 | the <code>SDL::init</code> subroutine. This routine takes a mode flag constructed through |
134 | the bitwise OR product of the following constants:</p> |
135 | <dl> |
136 | <dt>* |
137 | INIT_AUDIO</dt> |
138 | <dt>* |
139 | INIT_VIDEO</dt> |
140 | <dt>* |
141 | INIT_CDROM</dt> |
142 | <dt>* |
143 | INIT_EVERYTHING</dt> |
144 | <dt>* |
145 | INIT_NOPARACHUTE</dt> |
146 | <dt>* |
147 | INIT_JOYSTICK</dt> |
148 | <dt>* |
149 | INIT_TIMER</dt> |
150 | </dl> |
151 | <p><code>SDL::Init</code> returns 0 on success, or -1 on error.</p> |
152 | |
153 | </div> |
154 | <h2 id="init_subsystem_flags">init_subsystem(flags)</h2> |
155 | <div id="init_subsystem_flags_CONTENT"> |
156 | <p>After SDL has been initialized with SDL::init you may initialize uninitialized subsystems with SDL::init_subsystem. |
157 | The flags parameter is the same as that used in SDL::init. </p> |
158 | <p>SDL::init_subsystem returns 0 on success, or -1 on error.</p> |
159 | |
160 | </div> |
161 | <h2 id="quit_subsystem_flags">quit_subsystem(flags)</h2> |
162 | <div id="quit_subsystem_flags_CONTENT"> |
163 | <p>SDL::quit_subsystem allows you to shut down a subsystem that has been previously initialized by SDL::init or SDL::init_subsystem. |
164 | The flags tells SDL::quit_subSystem which subsystems to shut down, it uses the same values that are passed to SDL::init. </p> |
165 | <p>SDL::quit_subsystem doesn't returns any value.</p> |
166 | |
167 | </div> |
168 | <h2 id="quit">quit</h2> |
169 | <div id="quit_CONTENT"> |
170 | <p>Shuts down all SDL subsystems, unloads the dynamically linked library and frees the allocated resources. This should always be called before you exit.</p> |
171 | <p>SDL::quit doesn't returns any value.</p> |
172 | |
173 | </div> |
174 | <h2 id="was_init_flags">was_init(flags)</h2> |
175 | <div id="was_init_flags_CONTENT"> |
176 | <p>SDL::was_init allows you to see which SDL subsytems have been initialized. |
177 | flags is a bitwise OR'd combination of the subsystems you wish to check (see SDL::init for a list of subsystem flags). |
178 | If 'flags' is 0 or SDL_INIT_EVERYTHING, it returns a mask of all initialized subsystems (this does not include SDL_INIT_EVENTTHREAD or SDL_INIT_NOPARACHUTE).</p> |
179 | |
180 | |
181 | |
182 | |
183 | |
184 | </div> |
185 | <h2 id="get_error">get_error()</h2> |
186 | <div id="get_error_CONTENT"> |
187 | <p>The last error message set by the SDL library can be retrieved using the subroutine |
188 | <code>SDL::get_error</code>, which returns a scalar containing the text of the message if any.</p> |
189 | |
190 | </div> |
191 | <h2 id="set_error_error_need_to_be_coded">set_error(error) *need to be coded</h2> |
192 | <div id="set_error_error_need_to_be_coded_CON"> |
193 | <p>SDL::get_error sets the SDL error to a printf style formatted string. |
194 | it doesn't returns any values.</p> |
195 | |
196 | </div> |
197 | <h2 id="error_code_need_to_be_coded">error(code) * need to be coded</h2> |
198 | <div id="error_code_need_to_be_coded_CONTENT"> |
199 | <p>Sets the SDL error message to one of several predefined strings specified by code. </p> |
200 | <p>code can be :</p> |
201 | <pre> SDL_errorcode The corresponding error string |
202 | |
203 | SDL_ENOMEM Out of memory |
204 | SDL_EFREAD Error reading from datastream |
205 | SDL_EFWRITE Error writing to datastream |
206 | SDL_EFSEEK Error seeking in datastream |
207 | SDL_UNSUPPORTED Unknown SDL error |
208 | SDL_LASTERROR Unknown SDL error |
209 | any other value Unknown SDL error |
210 | |
211 | |
212 | |
213 | |
214 | Note 1: SDL_LASTERROR marks the highest numbered predefined error. |
215 | Note 2: SDL also defines SDL_OutOfMemory() and SDL_Unsupported() for internal use |
216 | which are equivalent to SDL_Error(SDL_ENOMEM) and SDL_Error(SDL_UNSUPPORTED) respectively. |
217 | |
218 | </pre> |
219 | <p>SDL::Error doesn't returns any value.</p> |
220 | |
221 | |
222 | |
223 | |
224 | |
225 | </div> |
226 | <h2 id="clear_error_need_to_be_coded">clear_error() * need to be coded</h2> |
227 | <div id="clear_error_need_to_be_coded_CONTENT"> |
228 | <p>SDL::clear_error deletes all information about the last internal SDL error. Useful if the error has been handled by the program. |
229 | it doesn't returns any value.</p> |
230 | |
231 | </div> |
232 | <h2 id="load_object">load_object()</h2> |
233 | <div id="load_object_CONTENT"> |
234 | <p>Need to be coded.</p> |
235 | |
236 | </div> |
237 | <h2 id="load_function">load_function()</h2> |
238 | <div id="load_function_CONTENT"> |
239 | <p>Need to be coded.</p> |
240 | |
241 | </div> |
242 | <h2 id="unload_object">unload_object()</h2> |
243 | <div id="unload_object_CONTENT"> |
244 | <p>Need to be coded.</p> |
245 | |
246 | </div> |
247 | <h2 id="VERSION">VERSION()</h2> |
248 | <div id="VERSION_CONTENT"> |
249 | <p>Need to be coded. </p> |
250 | |
251 | </div> |
252 | <h2 id="version">version()</h2> |
253 | <div id="version_CONTENT"> |
254 | <p>Need to be coded.</p> |
255 | |
256 | </div> |
257 | <h2 id="linked_version">linked_version</h2> |
258 | <div id="linked_version_CONTENT"> |
259 | <p>Need to be coded.</p> |
260 | |
261 | </div> |
262 | <h2 id="get_error-2">get_error()</h2> |
263 | <div id="get_error_CONTENT-2"> |
264 | <p>The last error message set by the SDL library can be retrieved using the subroutine |
265 | <code>SDL::get_error</code>, which returns a scalar containing the text of the message if any.</p> |
266 | |
267 | </div> |
268 | <h2 id="delay_ms">delay(ms)</h2> |
269 | <div id="delay_ms_CONTENT"> |
270 | <p>This subroutine allows an application to delay further operations for atleast a |
271 | number of milliseconds provided as the argument. The actual delay may be longer |
272 | than the specified depending on the underlying OS.</p> |
273 | |
274 | |
275 | |
276 | |
277 | |
278 | |
279 | |
280 | |
281 | </div> |
282 | </div> |