Documentation ¶
Index ¶
- Variables
- func WithCursorImage(img image.Image) func(g *GUI) error
- func WithFontDPI(dpi float64) func(g *GUI) error
- func WithFontFamily(family string) func(g *GUI) error
- func WithFontSize(size float64) func(g *GUI) error
- func WithHinter(h hinters.Hinter) func(g *GUI) error
- func WithLigatures(enable bool) func(g *GUI) error
- func WithOpacity(opacity float64) func(g *GUI) error
- type GUI
- func (g *GUI) CellSize() image.Point
- func (g *GUI) ClearHighlight()
- func (g *GUI) Draw(screen *ebiten.Image)
- func (g *GUI) Highlight(start termutil.Position, end termutil.Position, label string, img image.Image)
- func (g *GUI) Layout(outsideWidth, outsideHeight int) (int, int)
- func (g *GUI) RequestScreenshot(filename string)
- func (g *GUI) ResetCursor()
- func (g *GUI) Run() error
- func (g *GUI) SetCursorToPointer()
- func (g *GUI) ShowError(msg string)
- func (g *GUI) ShowMessage(msg string)
- func (g *GUI) ShowPopup(msg string, fg color.Color, bg color.Color, duration time.Duration)
- func (g *GUI) Update() error
- type MouseState
- type Option
- type WindowManipulator
- func (m *WindowManipulator) CellSizeInPixels() (int, int)
- func (m *WindowManipulator) GetTitle() string
- func (m *WindowManipulator) IsFullscreen() bool
- func (m *WindowManipulator) Maximise()
- func (m *WindowManipulator) Minimise()
- func (m *WindowManipulator) Move(x, y int)
- func (m *WindowManipulator) Position() (int, int)
- func (m *WindowManipulator) ReportError(err error)
- func (m *WindowManipulator) ResizeInChars(cols int, rows int)
- func (m *WindowManipulator) ResizeInPixels(x int, y int)
- func (m *WindowManipulator) Restore()
- func (m *WindowManipulator) RestoreTitleFromStack()
- func (m *WindowManipulator) SaveTitleToStack()
- func (m *WindowManipulator) ScreenSizeInChars() (int, int)
- func (m *WindowManipulator) ScreenSizeInPixels() (int, int)
- func (m *WindowManipulator) SetFullscreen(enabled bool)
- func (m *WindowManipulator) SetTitle(title string)
- func (m *WindowManipulator) SizeInChars() (int, int)
- func (m *WindowManipulator) SizeInPixels() (int, int)
- func (m *WindowManipulator) State() termutil.WindowState
Constants ¶
This section is empty.
Variables ¶
View Source
var ( KeyPressDelayNS = 500_000_000 KeyPressRepeatNS = 30_000_000 KeyPressResetNS = 60_000_000 )
Functions ¶
func WithFontDPI ¶
func WithFontFamily ¶
func WithFontSize ¶
func WithLigatures ¶ added in v0.0.9
func WithOpacity ¶ added in v0.0.8
Types ¶
type GUI ¶
type GUI struct {
// contains filtered or unexported fields
}
func (*GUI) ClearHighlight ¶
func (g *GUI) ClearHighlight()
func (*GUI) Draw ¶
func (g *GUI) Draw(screen *ebiten.Image)
Draw renders the terminal GUI to the ebtien window. Required to implement the ebiten interface.
func (*GUI) Layout ¶
Layout provides the terminal gui size in pixels. Required to implement the ebiten interface.
func (*GUI) RequestScreenshot ¶
func (*GUI) ResetCursor ¶
func (g *GUI) ResetCursor()
func (*GUI) SetCursorToPointer ¶
func (g *GUI) SetCursorToPointer()
func (*GUI) ShowMessage ¶
type MouseState ¶
type MouseState uint8
const ( MouseStateNone MouseState = iota MouseStatePressed )
type Option ¶
func WithStartupFunc ¶
type WindowManipulator ¶
type WindowManipulator struct {
// contains filtered or unexported fields
}
func NewManipulator ¶
func NewManipulator(g *GUI) *WindowManipulator
func (*WindowManipulator) CellSizeInPixels ¶
func (m *WindowManipulator) CellSizeInPixels() (int, int)
func (*WindowManipulator) GetTitle ¶
func (m *WindowManipulator) GetTitle() string
func (*WindowManipulator) IsFullscreen ¶
func (m *WindowManipulator) IsFullscreen() bool
func (*WindowManipulator) Maximise ¶
func (m *WindowManipulator) Maximise()
func (*WindowManipulator) Minimise ¶
func (m *WindowManipulator) Minimise()
func (*WindowManipulator) Move ¶
func (m *WindowManipulator) Move(x, y int)
func (*WindowManipulator) Position ¶
func (m *WindowManipulator) Position() (int, int)
func (*WindowManipulator) ReportError ¶
func (m *WindowManipulator) ReportError(err error)
func (*WindowManipulator) ResizeInChars ¶
func (m *WindowManipulator) ResizeInChars(cols int, rows int)
func (*WindowManipulator) ResizeInPixels ¶
func (m *WindowManipulator) ResizeInPixels(x int, y int)
func (*WindowManipulator) Restore ¶
func (m *WindowManipulator) Restore()
func (*WindowManipulator) RestoreTitleFromStack ¶
func (m *WindowManipulator) RestoreTitleFromStack()
func (*WindowManipulator) SaveTitleToStack ¶
func (m *WindowManipulator) SaveTitleToStack()
func (*WindowManipulator) ScreenSizeInChars ¶
func (m *WindowManipulator) ScreenSizeInChars() (int, int)
func (*WindowManipulator) ScreenSizeInPixels ¶
func (m *WindowManipulator) ScreenSizeInPixels() (int, int)
func (*WindowManipulator) SetFullscreen ¶
func (m *WindowManipulator) SetFullscreen(enabled bool)
func (*WindowManipulator) SetTitle ¶
func (m *WindowManipulator) SetTitle(title string)
func (*WindowManipulator) SizeInChars ¶
func (m *WindowManipulator) SizeInChars() (int, int)
func (*WindowManipulator) SizeInPixels ¶
func (m *WindowManipulator) SizeInPixels() (int, int)
func (*WindowManipulator) State ¶
func (m *WindowManipulator) State() termutil.WindowState
Source Files ¶
Click to show internal directories.
Click to hide internal directories.