OCamlSDL 0.9.1 : Sdlvideo

`sig
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 -> Sdlvideo.rect
val copy_rect : Sdlvideo.rect -> Sdlvideo.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 -> Sdlvideo.video_info
val get_video_info_format : unit -> Sdlvideo.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 -> Sdlvideo.video_flag list -> Sdlvideo.modes
val video_mode_ok :
w:int -> h:int -> bpp:int -> Sdlvideo.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 : Sdlvideo.surface_flags list;
w : int;
h : int;
pitch : int;
clip_rect : Sdlvideo.rect;
refcount : int;
}
val surface_info : Sdlvideo.surface -> Sdlvideo.surface_info
val surface_format : Sdlvideo.surface -> Sdlvideo.pixel_format_info
val surface_dims : Sdlvideo.surface -> int * int * int
val surface_flags : Sdlvideo.surface -> Sdlvideo.surface_flags list
val surface_bpp : Sdlvideo.surface -> int
val get_video_surface : unit -> Sdlvideo.surface
val set_video_mode :
w:int ->
h:int -> ?bpp:int -> Sdlvideo.video_flag list -> Sdlvideo.surface
val update_rect : ?rect:Sdlvideo.rect -> Sdlvideo.surface -> unit
val update_rects : Sdlvideo.rect list -> Sdlvideo.surface -> unit
val flip : Sdlvideo.surface -> unit
val set_gamma : r:float -> g:float -> b:float -> unit
type color = int * int * int
val black : Sdlvideo.color
val white : Sdlvideo.color
val red : Sdlvideo.color
val green : Sdlvideo.color
val blue : Sdlvideo.color
val yellow : Sdlvideo.color
val cyan : Sdlvideo.color
val magenta : Sdlvideo.color
val use_palette : Sdlvideo.surface -> bool
val palette_ncolors : Sdlvideo.surface -> int
val get_palette_color : Sdlvideo.surface -> int -> Sdlvideo.color
type palette_flag = LOGPAL | PHYSPAL | LOGPHYSPAL
val set_palette :
Sdlvideo.surface ->
?flag:Sdlvideo.palette_flag ->
?firstcolor:int -> Sdlvideo.color array -> unit
val map_RGB : Sdlvideo.surface -> ?alpha:int -> Sdlvideo.color -> int32
val get_RGB : Sdlvideo.surface -> int32 -> Sdlvideo.color
val get_RGBA : Sdlvideo.surface -> int32 -> Sdlvideo.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 -> Sdlvideo.surface
val create_RGB_surface_format :
Sdlvideo.surface ->
[ `ASYNCBLIT | `HWSURFACE | `SRCALPHA | `SRCCOLORKEY | `SWSURFACE ] list ->
w:int -> h:int -> Sdlvideo.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 -> Sdlvideo.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 -> Sdlvideo.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 -> Sdlvideo.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 -> Sdlvideo.surface
val must_lock : Sdlvideo.surface -> bool
val lock : Sdlvideo.surface -> unit
val unlock : Sdlvideo.surface -> unit
val pixel_data :
Sdlvideo.surface ->
(int, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
val pixel_data_8 :
Sdlvideo.surface ->
(int, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
val pixel_data_16 :
Sdlvideo.surface ->
(int, Bigarray.int16_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
val pixel_data_24 :
Sdlvideo.surface ->
(int, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
val pixel_data_32 :
Sdlvideo.surface ->
(int32, Bigarray.int32_elt, Bigarray.c_layout) Bigarray.Array1.t
val get_pixel : Sdlvideo.surface -> x:int -> y:int -> int32
val get_pixel_color : Sdlvideo.surface -> x:int -> y:int -> Sdlvideo.color
val put_pixel : Sdlvideo.surface -> x:int -> y:int -> int32 -> unit
val put_pixel_color :
Sdlvideo.surface -> x:int -> y:int -> Sdlvideo.color -> unit
val load_BMP : string -> Sdlvideo.surface
val load_BMP_from_mem : string -> Sdlvideo.surface
val save_BMP : Sdlvideo.surface -> string -> unit
val unset_color_key : Sdlvideo.surface -> unit
val set_color_key : Sdlvideo.surface -> ?rle:bool -> int32 -> unit
val get_color_key : Sdlvideo.surface -> int32
val unset_alpha : Sdlvideo.surface -> unit
val set_alpha : Sdlvideo.surface -> ?rle:bool -> int -> unit
val get_alpha : Sdlvideo.surface -> int
val unset_clip_rect : Sdlvideo.surface -> unit
val set_clip_rect : Sdlvideo.surface -> Sdlvideo.rect -> unit
val get_clip_rect : Sdlvideo.surface -> Sdlvideo.rect
val blit_surface :
src:Sdlvideo.surface ->
?src_rect:Sdlvideo.rect ->
dst:Sdlvideo.surface -> ?dst_rect:Sdlvideo.rect -> unit -> unit
val fill_rect : ?rect:Sdlvideo.rect -> Sdlvideo.surface -> int32 -> unit
val display_format : ?alpha:bool -> Sdlvideo.surface -> Sdlvideo.surface
end`