package js_of_ocaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
exception Graphic_failure of string
val close_graph : unit -> unit
val set_window_title : string -> unit
val resize_window : int -> int -> unit
val clear_graph : unit -> unit
val size_x : unit -> int
val size_y : unit -> int
type color = int
val rgb : int -> int -> int -> color
val set_color : color -> unit
val background : color
val foreground : color
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 plot : int -> int -> unit
val plots : (int * int) array -> unit
val point_color : int -> int -> color
val moveto : int -> int -> unit
val rmoveto : int -> int -> unit
val current_x : unit -> int
val current_y : unit -> int
val current_point : unit -> int * int
val lineto : int -> int -> unit
val rlineto : int -> int -> unit
val curveto : (int * int) -> (int * int) -> (int * int) -> unit
val draw_rect : int -> int -> int -> int -> unit
val draw_poly_line : (int * int) array -> unit
val draw_poly : (int * int) array -> unit
val draw_segments : (int * int * int * int) array -> unit
val draw_arc : int -> int -> int -> int -> int -> int -> unit
val draw_ellipse : int -> int -> int -> int -> unit
val draw_circle : int -> int -> int -> unit
val set_line_width : int -> unit
val draw_char : char -> unit
val draw_string : string -> unit
val set_font : string -> unit
val set_text_size : int -> unit
val text_size : string -> int * int
val fill_rect : int -> int -> int -> int -> unit
val fill_poly : (int * int) array -> unit
val fill_arc : int -> int -> int -> int -> int -> int -> unit
val fill_ellipse : int -> int -> int -> int -> unit
val fill_circle : int -> int -> int -> unit
type image
val transp : color
val make_image : color array array -> image
val dump_image : image -> color array array
val draw_image : image -> int -> int -> unit
val get_image : int -> int -> int -> int -> image
val create_image : int -> int -> image
val blit_image : image -> int -> int -> unit
type status = {
  1. mouse_x : int;
  2. mouse_y : int;
  3. button : bool;
  4. keypressed : bool;
  5. key : char;
}
type event =
  1. | Button_down
  2. | Button_up
  3. | Key_pressed
  4. | Mouse_motion
  5. | Poll
val wait_next_event : event list -> status
val loop_at_exit : event list -> (status -> unit) -> unit
val key_pressed : unit -> bool
val sound : int -> int -> unit
val auto_synchronize : bool -> unit
val synchronize : unit -> unit
val display_mode : bool -> unit
val remember_mode : bool -> unit
type context
val open_graph : string -> unit
val open_canvas : Dom_html.canvasElement Js.t -> unit
val get_context : unit -> context
val set_context : context -> unit
val loop : event list -> (status -> unit) -> unit
val mouse_pos : unit -> (int * int) Lwt.t
val button_down : unit -> bool Lwt.t
val read_key : unit -> char Lwt.t
OCaml

Innovation. Community. Security.