module Graphics_js:sig..end
include Graphics
type context
type of a graphic context
val open_graph : string -> unitval open_canvas : Dom_html.canvasElement Js.t -> unitval get_context : unit -> contextval set_context : context -> unitval loop : event list -> (status -> unit) -> unit
Loops forever and listen to the given events. Those events automatically
returns a status record, which is used by the function given in argument.
val mouse_pos : unit -> (int * int) Lwt.t
Return the position of the mouse cursor, relative to the
graphics window. If the mouse cursor is outside of the graphics
window, mouse_pos() returns a point outside of the range
0..size_x()-1, 0..size_y()-1.
: unit -> bool Lwt.ttrue if the mouse button is pressed, false otherwise.val read_key : unit -> char Lwt.t