Documentation
¶
Overview ¶
Package soopentui is a third-party Solod (So) binding for the OpenTUI native C ABI.
Index ¶
- Constants
- func Clear(buffer Handle, bg RGBA)
- func Destroy(renderer Handle)
- func DrawText(buffer Handle, text string, x, y uint32, fg RGBA)
- func Render(renderer Handle, force bool) uint8
- func RestoreTerminal(renderer Handle)
- func SetRGB(out *RGBA, r, g, b uint8)
- func SetupTerminal(renderer Handle, alternateScreen bool)
- type Handle
- type RGBA
Constants ¶
View Source
const DestinationMemory uint8 = 1
DestinationMemory keeps frames in memory (no terminal I/O).
View Source
const DestinationStdout uint8 = 0
DestinationStdout writes rendered frames to the terminal.
View Source
const RemoteAuto uint8 = 0
RemoteAuto lets OpenTUI detect local vs remote terminal behavior.
View Source
const RemoteLocal uint8 = 1
RemoteLocal forces local terminal mode.
View Source
const RemoteRemote uint8 = 2
RemoteRemote forces remote terminal mode.
Variables ¶
This section is empty.
Functions ¶
func RestoreTerminal ¶
func RestoreTerminal(renderer Handle)
RestoreTerminal restores the terminal after SetupTerminal.
func SetupTerminal ¶
SetupTerminal enters the OpenTUI terminal modes (optionally alternate screen).
Types ¶
type Handle ¶
type Handle = uint32
Handle is an OpenTUI native object handle.
const InvalidHandle Handle = 0
func CreateRenderer ¶
CreateRenderer creates a renderer for the given terminal size.
func NextBuffer ¶
NextBuffer returns the buffer to draw into for the next frame.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
hello-tui
command
Command hello-tui builds examples/hello-tui with a statically linked OpenTUI.
|
Command hello-tui builds examples/hello-tui with a statically linked OpenTUI. |
|
opentui-static
command
Command opentui-static clones OpenTUI under _build/, patches it for static linkage, and builds libopentui.a.
|
Command opentui-static clones OpenTUI under _build/, patches it for static linkage, and builds libopentui.a. |
Click to show internal directories.
Click to hide internal directories.