add s2.mli

This commit is contained in:
tali 2024-01-19 15:24:04 -05:00
parent 95758ed7c6
commit 104d941ab7
1 changed files with 37 additions and 0 deletions

37
src/s2/s2.mli Normal file
View File

@ -0,0 +1,37 @@
module Gl : sig
exception Error of string * string
end
module Sdl : sig
exception Error of string
end
module Window : sig
type t
val make : title:string -> t
val destroy : t -> unit
val event_loop : t -> render:(float -> unit) -> unit
end
module Renderer : sig
open Adam
type t
val make : window:Window.t -> t
val destroy : t -> unit
val pre_draw : t -> unit
val post_draw : t -> unit
val clear : t -> color -> unit
val draw_rect : t -> tf:mat2a -> bb:aabb -> fill:color -> unit
end
module Asset : sig
open Sexplib
exception Error of string * string
val load_file : string -> string
val load_sexp_conv : string -> (Sexp.t -> 'a) -> 'a
end