Browse Source

Nottui: direct access to layout information

nottui-full-sensor
Frédéric Bour 1 year ago
parent
commit
a890be2217
2 changed files with 8 additions and 0 deletions
  1. +4
    -0
      lib/nottui/nottui.ml
  2. +4
    -0
      lib/nottui/nottui.mli

+ 4
- 0
lib/nottui/nottui.ml View File

@ -204,6 +204,10 @@ struct
let layout_spec t : layout_spec =
{ w = t.w; h = t.h; sw = t.sw; sh = t.sh }
let layout_width t = t.w
let layout_stretch_width t = t.sw
let layout_height t = t.h
let layout_stretch_height t = t.sh
let cache : cache =
{ vx1 = 0; vy1 = 0; vx2 = 0; vy2 = 0;


+ 4
- 0
lib/nottui/nottui.mli View File

@ -94,6 +94,10 @@ sig
space. *)
val layout_spec : t -> layout_spec
val layout_width : t -> int
val layout_stretch_width : t -> int
val layout_height : t -> int
val layout_stretch_height : t -> int
end
type ui = Ui.t


Loading…
Cancel
Save