From b497ddf1e6361fedaa9a10fe1336c884b0ea08ce Mon Sep 17 00:00:00 2001 From: Jakub Sobon Date: Sat, 2 Mar 2019 18:33:32 -0500 Subject: [PATCH] Updated Termbox API (markdown) --- Termbox-API.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Termbox-API.md b/Termbox-API.md index 41758e3..a159415 100644 --- a/Termbox-API.md +++ b/Termbox-API.md @@ -2,11 +2,11 @@ [![Doc Status](https://godoc.org/github.com/mum4k/termdash/terminal/termbox?status.png)](https://godoc.org/github.com/mum4k/termdash/terminal/termbox) -The [termbox](https://github.com/mum4k/termdash/tree/master/terminal/termbox) package implements the [[Terminal API|terminal-api]] using the [termbox-go](https://github.com/nsf/termbox-go). Termbox provides cell based access to the terminal. +The [termbox](https://godoc.org/github.com/mum4k/termdash/terminal/termbox) package implements the [[Terminal API|terminal-api]] using the [termbox-go](https://github.com/nsf/termbox-go). Termbox provides cell based access to the terminal. The public API surface of this package consists of the following: -## [termbox.New](https://github.com/mum4k/termdash/blob/614d6ed82014e343ca40f25ee1bed8dfbd452830/terminal/termbox/termbox.go#L82-L97) +## [termbox.New](https://godoc.org/github.com/mum4k/termdash/terminal/termbox#New) Users of Termdash need to provide [[Termdash API|termdash-api]] with a terminal instance. Termbox is one of the valid options. Use the **New** function to create a Terminal instance. @@ -17,11 +17,11 @@ if err != nil { } ``` -## [termbox.Option](https://github.com/mum4k/termdash/blob/614d6ed82014e343ca40f25ee1bed8dfbd452830/terminal/termbox/termbox.go#L28-L32) +## [termbox.Option](https://godoc.org/github.com/mum4k/termdash/terminal/termbox#Option) This interface is used to provide optional arguments to **New**. -### [termbox.ColorMode](https://github.com/mum4k/termdash/blob/614d6ed82014e343ca40f25ee1bed8dfbd452830/terminal/termbox/termbox.go#L45-L51) +### [termbox.ColorMode](https://godoc.org/github.com/mum4k/termdash/terminal/termbox#ColorMode) Used to set the color mode in which the terminal will be initialised. The available color modes are documented in the [[Terminal API|terminal-api]]. The following example sets the color mode to grayscale. Note that when no options are provided, Termbox is initialised in a color mode that supports all 256 terminal colors. Refer to the [[Cell API|cell-api]] for an explanation of terminal colors. @@ -32,7 +32,7 @@ if err != nil { } ``` -## [termbox.Close](https://github.com/mum4k/termdash/blob/ffbf88caeddb1735dcf2a5f735eec80dc9cf9fe7/terminal/termbox/termbox.go#L158-L164) +## [termbox.Close](https://godoc.org/github.com/mum4k/termdash/terminal/termbox#Terminal.Close) This function should be used to close the terminal and return it to a sane state once the Termbox instance isn't needed anymore. A good practice is to defer the call right after Termbox instance is created: