ocamlsdl

Interface between OCaml and SDL
IN THIS PACKAGE
Module Sdlvideo
exception Video_exn of string
type rect = {
mutable r_x : int;
mutable r_y : int;
mutable r_w : int;
mutable r_h : int;
}
val rect : x:int -> y:int -> w:int -> h:int -> rect
val copy_rect : rect -> rect
type pixel_format_info = {
palette : bool;
bits_pp : int;
bytes_pp : int;
rmask : int32;
gmask : int32;
bmask : int32;
amask : int32;
rshift : int;
gshift : int;
bshift : int;
ashift : int;
rloss : int;
gloss : int;
bloss : int;
aloss : int;
colorkey : int32;
alpha : int;
}
type video_info = {
hw_available : bool;
wm_available : bool;
blit_hw : bool;
blit_hw_color_key : bool;
blit_hw_alpha : bool;
blit_sw : bool;
blit_sw_color_key : bool;
blit_sw_alpha : bool;
blit_fill : bool;
video_mem : int;
}
val get_video_info : unit -> video_info
val get_video_info_format : unit -> pixel_format_info
val driver_name : unit -> string
type video_flag = [
| `ANYFORMAT
| `ASYNCBLIT
| `DOUBLEBUF
| `FULLSCREEN
| `HWPALETTE
| `HWSURFACE
| `NOFRAME
| `OPENGL
| `OPENGLBLIT
| `RESIZABLE
| `SWSURFACE
]
type modes =
| NOMODE
| ANY
| DIM of (int * int) list
val list_modes : ?bpp:int -> video_flag list -> modes
val video_mode_ok : w:int -> h:int -> bpp:int -> video_flag list -> int
type surface
type surface_flags = [
| `ANYFORMAT
| `ASYNCBLIT
| `DOUBLEBUF
| `FULLSCREEN
| `HWACCEL
| `HWPALETTE
| `HWSURFACE
| `NOFRAME
| `OPENGL
| `OPENGLBLIT
| `PREALLOC
| `RESIZABLE
| `RLEACCEL
| `SRCALPHA
| `SRCCOLORKEY
| `SWSURFACE
]
type surface_info = {
flags : surface_flags list;
w : int;
h : int;
pitch : int;
clip_rect : rect;
refcount : int;
}
val surface_info : surface -> surface_info
val surface_format : surface -> pixel_format_info
val surface_dims : surface -> int * int * int
val surface_flags : surface -> surface_flags list
val surface_bpp : surface -> int
val get_video_surface : unit -> surface
val set_video_mode : w:int -> h:int -> ?bpp:int -> video_flag list -> surface
val update_rect : ?rect:rect -> surface -> unit
val update_rects : rect list -> surface -> unit
val flip : surface -> unit
val set_gamma : r:float -> g:float -> b:float -> unit
type color = int * int * int
val black : color
val white : color
val red : color
val green : color
val blue : color
val yellow : color
val cyan : color
val magenta : color
val use_palette : surface -> bool
val palette_ncolors : surface -> int
val get_palette_color : surface -> int -> color
type palette_flag =
| LOGPAL
| PHYSPAL
| LOGPHYSPAL
val set_palette : surface -> ?flag:palette_flag -> ?firstcolor:int -> color array -> unit
val map_RGB : surface -> ?alpha:int -> color -> int32
val get_RGB : surface -> int32 -> color
val get_RGBA : surface -> int32 -> color * int
val create_RGB_surface : [ `ASYNCBLIT | `HWSURFACE | `SRCALPHA | `SRCCOLORKEY | `SWSURFACE ] list -> w:int -> h:int -> bpp:int -> rmask:int32 -> gmask:int32 -> bmask:int32 -> amask:int32 -> surface
val create_RGB_surface_format : surface -> [ `ASYNCBLIT | `HWSURFACE | `SRCALPHA | `SRCCOLORKEY | `SWSURFACE ] list -> w:int -> h:int -> surface
val create_RGB_surface_from_32 : ( int32, Bigarray.int32_elt, Bigarray.c_layout ) Bigarray.Array1.t -> w:int -> h:int -> pitch:int -> rmask:int32 -> gmask:int32 -> bmask:int32 -> amask:int32 -> surface
val create_RGB_surface_from_24 : ( int, Bigarray.int8_unsigned_elt, Bigarray.c_layout ) Bigarray.Array1.t -> w:int -> h:int -> pitch:int -> rmask:int -> gmask:int -> bmask:int -> amask:int -> surface
val create_RGB_surface_from_16 : ( int, Bigarray.int16_unsigned_elt, Bigarray.c_layout ) Bigarray.Array1.t -> w:int -> h:int -> pitch:int -> rmask:int -> gmask:int -> bmask:int -> amask:int -> surface
val create_RGB_surface_from_8 : ( int, Bigarray.int8_unsigned_elt, Bigarray.c_layout ) Bigarray.Array1.t -> w:int -> h:int -> pitch:int -> rmask:int -> gmask:int -> bmask:int -> amask:int -> surface
val must_lock : surface -> bool
val lock : surface -> unit
val unlock : surface -> unit
val get_pixel : surface -> x:int -> y:int -> int32
val get_pixel_color : surface -> x:int -> y:int -> color
val put_pixel : surface -> x:int -> y:int -> int32 -> unit
val put_pixel_color : surface -> x:int -> y:int -> color -> unit
val load_BMP : string -> surface
val load_BMP_from_mem : string -> surface
val save_BMP : surface -> string -> unit
val unset_color_key : surface -> unit
val set_color_key : surface -> ?rle:bool -> int32 -> unit
val get_color_key : surface -> int32
val unset_alpha : surface -> unit
val set_alpha : surface -> ?rle:bool -> int -> unit
val get_alpha : surface -> int
val unset_clip_rect : surface -> unit
val set_clip_rect : surface -> rect -> unit
val get_clip_rect : surface -> rect
val blit_surface : src:surface -> ?src_rect:rect -> dst:surface -> ?dst_rect:rect -> unit -> unit
val fill_rect : ?rect:rect -> surface -> int32 -> unit
val display_format : ?alpha:bool -> surface -> surface