mirror of
https://github.com/taigrr/gopher-os
synced 2025-01-18 04:43:13 -08:00
Define TTY interface
This commit is contained in:
parent
138bc244f9
commit
95ce4c6057
18
kernel/driver/tty/tty.go
Normal file
18
kernel/driver/tty/tty.go
Normal file
@ -0,0 +1,18 @@
|
||||
package tty
|
||||
|
||||
import "io"
|
||||
|
||||
// Tty is implemented by objects that can register themselves as ttys.
|
||||
type Tty interface {
|
||||
io.Writer
|
||||
|
||||
// Position returns the current cursor position (x, y).
|
||||
Position() (uint16, uint16)
|
||||
|
||||
// SetPosition sets the current cursor position to (x,y). Console implementations
|
||||
// must clip the provided cursor position if it exceeds the console dimensions.
|
||||
SetPosition(x, y uint16)
|
||||
|
||||
// Clear clears the terminal.
|
||||
Clear()
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user