Documentation
¶
Index ¶
- Constants
- Variables
- func SetElementXY(xy *XY) rune
- type AiMetaT
- type ApcSlice
- type AppWindowTerms
- type BlockMeta
- type BlockMetaFlag
- type ButtonStateT
- type CallerT
- type Cell
- type Colour
- type ContextMenu
- type Element
- type ElementID
- type EventIgnoredCallback
- type FuncMutex
- type Image
- type InputBoxCallbackT
- type KeyboardMode
- type MenuCallbackT
- type MenuItem
- type MouseButtonT
- type Notification
- type NotificationType
- type Pty
- type Renderer
- type Row
- type RowMetaFlag
- type RowSource
- type Screen
- type SearchMode
- type Sgr
- type SgrFlag
- type Tab
- type Term
- type TerminalPaneTab
- type Tile
- type XY
Constants ¶
View Source
const ( KEY_STR_CTRL = "Ctrl" KEY_STR_SHIFT = "Shift" )
View Source
const ( KEY_STR_ALT = "Alt" KEY_STR_META = "Meta" )
View Source
const ( NOTIFY_DEBUG = iota NOTIFY_INFO NOTIFY_WARN NOTIFY_ERROR NOTIFY_SCROLL NOTIFY_QUESTION )
View Source
const MENU_SEPARATOR = "-"
Variables ¶
View Source
var ( SGR_COLOR_FOREGROUND = rgb(238, 232, 213) SGR_COLOR_BACKGROUND = rgb(0, 43, 54) // solarized dark SGR_COLOR_BLACK = rgb(0, 43, 54) // rgb(7, 54, 66) SGR_COLOR_RED = rgb(220, 50, 47) SGR_COLOR_GREEN = rgb(133, 153, 0) SGR_COLOR_YELLOW = rgb(181, 137, 0) SGR_COLOR_BLUE = rgb(38, 139, 210) SGR_COLOR_MAGENTA = rgb(211, 54, 130) SGR_COLOR_CYAN = rgb(42, 161, 152) SGR_COLOR_WHITE = rgb(238, 232, 213) SGR_COLOR_BLACK_BRIGHT = rgb(0, 33, 44) // rgb(0, 43, 54) SGR_COLOR_RED_BRIGHT = rgb(203, 75, 22) SGR_COLOR_GREEN_BRIGHT = rgb(88, 110, 117) SGR_COLOR_YELLOW_BRIGHT = rgb(101, 123, 131) SGR_COLOR_BLUE_BRIGHT = rgb(131, 148, 150) SGR_COLOR_MAGENTA_BRIGHT = rgb(108, 113, 196) SGR_COLOR_CYAN_BRIGHT = rgb(147, 161, 161) SGR_COLOR_WHITE_BRIGHT = rgb(253, 246, 227) )
View Source
var ( COLOR_TEXT_SHADOW = rgb(0, 0, 0) COLOR_SELECTION = rgb(64, 64, 255) COLOR_SEARCH_RESULT = rgb(64, 64, 255) )
View Source
var ( COLOR_OK = SGR_COLOR_GREEN COLOR_ERROR = SGR_COLOR_RED COLOR_AI = SGR_COLOR_BLUE COLOR_FOLDED = SGR_COLOR_YELLOW )
View Source
var ( ERR_PHRASE_OVERFLOW_ROW = errors.New("overflow row") ERR_PHRASE_INVALID_ROW = errors.New("index does not exist in slice") )
View Source
var SGR_COLOR_256 = map[int32]*Colour{}/* 256 elements not displayed */
SGR_COLOR_256 colours are a copy of xterm 256 colour values. source: https://vim.fandom.com/wiki/Xterm256_color_names_for_console_Vim
View Source
var SGR_DEFAULT = &Sgr{ Fg: SGR_COLOR_FOREGROUND, Bg: SGR_COLOR_BACKGROUND, }
View Source
var SGR_HEADING = &Sgr{ Fg: SGR_DEFAULT.Fg, Bg: SGR_DEFAULT.Bg, Bitwise: SGR_BOLD, }
View Source
var THEME_LIGHT bool
Functions ¶
func SetElementXY ¶
Types ¶
type ApcSlice ¶
type ApcSlice struct {
// contains filtered or unexported fields
}
func NewApcSlice ¶
func NewApcSliceNoParse ¶
func (*ApcSlice) Parameters ¶
type AppWindowTerms ¶
type BlockMetaFlag ¶
type BlockMetaFlag uint16
const ( META_BLOCK_NONE BlockMetaFlag = 0 META_BLOCK_OK BlockMetaFlag = 1 << iota META_BLOCK_ERROR META_BLOCK_AI )
func (BlockMetaFlag) Is ¶
func (f BlockMetaFlag) Is(flag BlockMetaFlag) bool
func (*BlockMetaFlag) Set ¶
func (f *BlockMetaFlag) Set(flag BlockMetaFlag)
func (*BlockMetaFlag) Unset ¶
func (f *BlockMetaFlag) Unset(flag BlockMetaFlag)
type ButtonStateT ¶
type ButtonStateT int
const ( BUTTON_PRESSED ButtonStateT = 1 BUTTON_RELEASED ButtonStateT = 0 )
type Cell ¶
func (*Cell) GetElementXY ¶
type Colour ¶
type ContextMenu ¶
type Element ¶
type Element interface {
Generate(*ApcSlice) error
Write(rune) error
Rune(*XY) rune
Size() *XY
Draw(*XY)
MouseClick(*XY, MouseButtonT, uint8, ButtonStateT, EventIgnoredCallback)
MouseWheel(*XY, *XY, EventIgnoredCallback)
MouseMotion(*XY, *XY, EventIgnoredCallback)
MouseHover(curPosTile *XY, curPosElement *XY) func()
MouseOut()
}
type EventIgnoredCallback ¶
type EventIgnoredCallback func()
type InputBoxCallbackT ¶
type InputBoxCallbackT func(string)
type KeyboardMode ¶
type KeyboardMode int32
const ( KeysNormal KeyboardMode = 0 + iota KeysApplication KeysVT220 KeysVT52 KeysTmuxClient )
type MenuCallbackT ¶
type MenuCallbackT func(int)
type MenuItem ¶
type MenuItem struct {
Title string
Fn func()
Highlight func() func()
Icon rune
// WebkitContextHighlightPersistent is set by the webkit renderer for
// AddToContextMenu() items so Highlight()'s returned function is treated as a
// per-frame draw callback while the item is highlighted.
WebkitContextHighlightPersistent bool
}
type MouseButtonT ¶
type MouseButtonT int
const ( MOUSE_BUTTON_LEFT MouseButtonT = 1 + iota MOUSE_BUTTON_MIDDLE MOUSE_BUTTON_RIGHT MOUSE_BUTTON_X1 MOUSE_BUTTON_X2 )
type Notification ¶
type Notification interface {
SetMessage(string)
UpdateCanceller(func())
Close()
}
type NotificationType ¶
type NotificationType int
type Renderer ¶
type Renderer interface {
Start(*AppWindowTerms, any, context.Context)
ShowAndFocusWindow()
GetWindowSizeCells() *XY
GetGlyphSize() *XY
GetBlinkState() bool
SetBlinkState(bool)
PrintCell(Tile, *Cell, *XY)
PrintRow(Tile, []*Cell, *XY)
DrawFrame(tile Tile)
DrawGaugeH(tile Tile, topLeft *XY, width int32, value, max int, c *Colour)
DrawGaugeV(tile Tile, topLeft *XY, height int32, value, max int, c *Colour)
DrawTable(Tile, *XY, int32, []int32)
DrawHighlightRect(Tile, *XY, *XY)
DrawRectWithColour(Tile, *XY, *XY, *Colour, bool)
DrawRectWithColourAndBorder(Tile, *XY, *XY, *Colour, bool, bool)
DrawOutputBlockChrome(Tile, int32, int32, *Colour, bool)
GetWindowTitle() string
SetWindowTitle(string)
StatusBarText(string)
RefreshWindowList()
Bell()
TriggerRedraw()
TriggerLazyRedraw()
TriggerDeallocation(func())
TriggerQuit()
NewElement(Tile, ElementID) Element
DisplayNotification(NotificationType, string)
DisplaySticky(NotificationType, string, func()) Notification
DisplayInputBox(string, string, InputBoxCallbackT, InputBoxCallbackT)
DisplayMenu(title string, items []string, highlight MenuCallbackT, ok MenuCallbackT, cancel MenuCallbackT)
NewContextMenu() ContextMenu
AddToContextMenu(...MenuItem)
GetWindowMeta() any
ResizeWindow(*XY)
SetKeyboardFnMode(KeyboardMode)
GetKeyboardModifier() int
RefreshNotes()
NotesCreateAndOpen(filename, contents string)
EmitAIResponseChunk(chunk string)
DisplayImageFullscreen(dataURL string, sourceWidth, sourceHeight int32)
ActiveTile() Tile
GetContext() context.Context
Close()
}
type Row ¶
type RowMetaFlag ¶
type RowMetaFlag uint16
const ( META_ROW_NONE RowMetaFlag = 0 META_ROW_BEGIN_BLOCK RowMetaFlag = 1 << iota META_ROW_END_BLOCK META_ROW_FROM_LINE_OVERFLOW META_ROW_AUTO_HYPERLINKED )
func (RowMetaFlag) Is ¶
func (f RowMetaFlag) Is(flag RowMetaFlag) bool
func (*RowMetaFlag) Set ¶
func (f *RowMetaFlag) Set(flag RowMetaFlag)
func (*RowMetaFlag) Unset ¶
func (f *RowMetaFlag) Unset(flag RowMetaFlag)
type SearchMode ¶
type SearchMode int
const ( SEARCH_REGEX SearchMode = iota SEARCH_RESULTS SEARCH_CLEAR SEARCH_CMD_LINES SEARCH_AI_PROMPTS )
type SgrFlag ¶
type SgrFlag uint16
type Term ¶
type Term interface {
Start(Pty)
GetSize() *XY
GetSgr() *Sgr
GetCellSgr(*XY) *Sgr
Resize(*XY)
Render() bool
Tile() Tile
GetCursorPosition() *XY
CopyRange(*XY, *XY) []byte
CopyLines(int32, int32) []byte
CopySquare(*XY, *XY) []byte
Reply([]byte)
MouseClick(*XY, MouseButtonT, uint8, ButtonStateT, EventIgnoredCallback)
MouseWheel(*XY, *XY)
MouseMotion(*XY, *XY, EventIgnoredCallback)
IsMouseCaptureEnabled() bool
MouseHover(*XY)
ShowCursor(bool)
SetFocus(bool)
IsFocused() bool
MakeVisible(bool)
Search(SearchMode)
Match(*XY)
GetRowId(int32) uint64
InsertSubTerm(string, string, uint64, BlockMetaFlag, *AiMetaT, time.Time) error
ConvertRelativeToAbsoluteY(*XY) int32
FoldAtIndent(*XY) error
GetTermContents() []byte
Host(*XY) string
Pwd(*XY) string
CmdLine(*XY) string
Close()
}
type TerminalPaneTab ¶
TerminalPaneTab represents a non-tmux tab rendered in the terminal pane UI (for example, embedded Notes when the notes pane is collapsed).
Click to show internal directories.
Click to hide internal directories.