Skip to content

RaphGL/TermCL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


TermCL

Terminal control and ANSI escape code library for Odin




· Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Usage
  3. Acknowledgements

TermCL is an Odin library for writing TUIs and CLIs with. It provides allows you to control and draw to the terminal. The library should be compatible with any ANSI escape code compatible terminal, which is to say, almost every single modern terminal worth using :)

Usage

package main

import "termcl"

main :: proc() {
    scr := termcl.init_screen()
    defer termcl.destroy_screen(&scr)

    termcl.set_text_style(&scr, {.Bold, .Italic})
    termcl.write(&scr, "Hello ")
    termcl.reset_styles(&scr)

    termcl.set_text_style(&scr, {.Dim})
    termcl.set_color_style_8(&scr, .Green, nil)
    termcl.write(&scr, "from ANSI escapes")
    termcl.reset_styles(&scr)

    termcl.move_cursor(&scr, 10, 10)
    termcl.write(&scr, "Alles Ordnung")

    termcl.blit_screen(&scr)
}

About

Terminal Control Library for Odin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages