about summary refs log blame commit diff stats
path: root/src/io/term.nim
blob: 5103c153434fcc2ac39cfd4c800cbcb8e6bafd57 (plain) (tree)
1
2
3
4
5
6
7
8







                                           


                                                          


                                
import terminal

type
  TermAttributes* = object
    termWidth*: int
    termHeight*: int

proc getTermAttributes*(): TermAttributes =
  let attrs = TermAttributes(termWidth: terminalWidth(),
                             termHeight: terminalHeight())
  return attrs

proc termGoto*(x: int, y: int) =
  setCursorPos(stdout, x, y)