Kitty Graphics Protocol in OCaml
terminal
graphics
ocaml
1type t = {
2 x : int option;
3 y : int option;
4 base_frame : int option;
5 edit_frame : int option;
6 gap_ms : int option;
7 composition : Kgp_composition.t option;
8 background_color : int32 option;
9}
10
11let empty =
12 {
13 x = None;
14 y = None;
15 base_frame = None;
16 edit_frame = None;
17 gap_ms = None;
18 composition = None;
19 background_color = None;
20 }
21
22let make ?x ?y ?base_frame ?edit_frame ?gap_ms ?composition ?background_color () =
23 { x; y; base_frame; edit_frame; gap_ms; composition; background_color }
24
25let x t = t.x
26let y t = t.y
27let base_frame t = t.base_frame
28let edit_frame t = t.edit_frame
29let gap_ms t = t.gap_ms
30let composition t = t.composition
31let background_color t = t.background_color