Module Sdl


module Sdl: sig .. end
SDLCaml, an Objective Caml interface for the SDL library

exception SDL_failure of string
The general exception thrown by SDL in case of failure
type byte_array = (int, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t 
Unsigned char Bigarrays, with C-style layout

type init_flag =
| TIMER (*Initialize timer subsystem*)
| AUDIO (*Initialize audio subsystem*)
| VIDEO (*Initialize video subsystem*)
| CDROM (*Initialize CD ROM subsystem*)
| JOYSTICK (*Initialize joystick subsystem*)
| NOPARACHUTE (*Don't catch fatal signals*)
| EVENTTHREAD (*Run the event manager in a separate thread. Link with the Ocaml thread library if using this*)
| EVERYTHING (*Initialize all of the above subsystems, except for EVENTTHREAD*)
Initialization flags
val init : init_flag list -> unit
Initializes SDL. This should be called before all other SDL functions. The init_flag parameter is a list specifies what part(s) of SDL to initialize. Raises SDL_failure on failure
val quit : unit -> unit
Shuts down all SDL subsystems and frees the resources allocated to them.
val get_error : unit -> string
Gets a string containing a description of the most recent SDL error
module Video: sig .. end
Interface to SDL framebuffer
module Window: sig .. end
Windowing-related functions
module SDLGL: sig .. end
SDL OpenGL support
module Event: sig .. end
Event handling allows the application to receive input from the user.
module Timer: sig .. end
Timer module
module Audio: sig .. end
Low-level audio
module Draw: sig .. end
Extra functions: font, bitmap, scaling and pixel operations

Acknowledgements, license and copyright

SDLCaml

Source code, additions and modifications 2006 Elliott OTI

Copyright (C) 2006 Elliott OTI

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2, as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License version 2 for more details (enclosed in the file LGPL).

Credits

Parts of the documentation reproduced verbatim or in altered form from the libsdl documentation (http://www.libsdl.org)

Portions of modules Sdl, Video, SDLGL, Timer and Draw are based on code by Jean-Christophe Filliatre.

Copyright (C) 1999 Jean-Christophe FILLIATRE:

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2, as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License version 2 for more details (enclosed in the file LGPL).

The Event module contains code from the camlgl distribution (http://camlgl.sourceforge.net):

(C) 2001-2002 Nickolay Kolchin-Semyonov

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.

3. This notice may not be removed or altered from any source distribution.

Nickolay Kolchin-Semyonov

snob@snob.spb.ru