Kitty Graphics Protocol in OCaml
terminal graphics ocaml
at main 980 B view raw
1(*--------------------------------------------------------------------------- 2 Copyright (c) 2025 Anil Madhavapeddy. All rights reserved. 3 SPDX-License-Identifier: ISC 4 ---------------------------------------------------------------------------*) 5 6type t = { 7 x : int option; 8 y : int option; 9 base_frame : int option; 10 edit_frame : int option; 11 gap_ms : int option; 12 composition : Kgp_composition.t option; 13 background_color : int32 option; 14} 15 16let empty = 17 { 18 x = None; 19 y = None; 20 base_frame = None; 21 edit_frame = None; 22 gap_ms = None; 23 composition = None; 24 background_color = None; 25 } 26 27let make ?x ?y ?base_frame ?edit_frame ?gap_ms ?composition ?background_color () 28 = 29 { x; y; base_frame; edit_frame; gap_ms; composition; background_color } 30 31let x t = t.x 32let y t = t.y 33let base_frame t = t.base_frame 34let edit_frame t = t.edit_frame 35let gap_ms t = t.gap_ms 36let composition t = t.composition 37let background_color t = t.background_color