WIP layout engine

This commit is contained in:
2024-10-10 12:54:53 -06:00
commit 13c8a36ba7
17 changed files with 685 additions and 0 deletions
+70
View File
@@ -0,0 +1,70 @@
type offset = { x : int; y : int }
type ansirgb = int * int * int
type cursor_ops = Hide | Show | Move of offset
type screen_ops = Clear
type color =
| Black
| Red
| Green
| Yellow
| Blue
| Magenta
| Cyan
| White
| Gray
| BrightRed
| BrightGreen
| BrightYellow
| BrightBlue
| BrightMagenta
| BrightCyan
| BrightWhite
| Default
| Custom of ansirgb
type color_style =
| Foreground of color
| Background of color
type style =
| Reset
| Bold
| Underlined
| Blink
| Inverse
| Hidden
type ansi =
| Cursor of cursor_ops
| Screen of screen_ops
| ColorStyle of color_style
| Style of style
val string_of_ansi: ansi -> string
val termsize: offset
val pixel_ansi: offset -> color_style -> string
val top_block: string
val bot_block: string
val block: string
val black: color_style
val red: color_style
val green: color_style
val yellow: color_style
val blue: color_style
val magenta: color_style
val cyan: color_style
val white: color_style
val default: color_style
val bg_black: color_style
val bg_red: color_style
val bg_green: color_style
val bg_yellow: color_style
val bg_blue: color_style
val bg_magenta: color_style
val bg_cyan: color_style
val bg_white: color_style
val bg_default: color_style