Documentation ¶
Index ¶
- func Image2ANSI(img image.Image, cols, rows int, aspect float64, lightBackground bool) []byte
- type BackspaceEvent
- type ConnEndedEvent
- type ConnStartedEvent
- type DataOpenedEvent
- type EndConnReason
- type Event
- type FrameEvent
- type KeypressEvent
- type LogEvent
- type LogLevel
- type Message
- type MessageType
- type Page
- type ReceivedChatEvent
- type Renderer
- type ResizeEvent
- type SentMessageEvent
- type SetPageEvent
- type SkipEvent
- type State
- type ToggleHelpEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BackspaceEvent ¶
type BackspaceEvent struct{}
BackspaceEvent is fired when the backspace button is pressed.
type ConnEndedEvent ¶
type ConnEndedEvent struct { // The reason for the disconnection Reason EndConnReason }
ConnEndedEvent fires when the connection with your partner has been lost
type ConnStartedEvent ¶
type ConnStartedEvent struct{}
ConnStartedEvent fires when an ICE connection has been established and the call can begin
type DataOpenedEvent ¶
type DataOpenedEvent struct{}
DataOpenedEvent fires when the text chat data channel opens and the user can begin typing
type EndConnReason ¶
type EndConnReason int
const ( // User closed connection EndConnNormal EndConnReason = iota // Error during connection setup EndConnSetupError // Error during matching EndConnMatchError // Connection timed out EndConnTimedOut // Lost connection with partner EndConnDisconnected // Partner left EndConnGone )
type Event ¶
type Event interface{}
An Event represents a user action that cause changes in the UI state.
They're processed by Renderer's Dispatch method.
type FrameEvent ¶
FrameEvent is sent when the video decoder renders a new frame
type KeypressEvent ¶
type KeypressEvent rune
KeypressEvent is fired when the user presses the keyboard.
type Message ¶
type Message struct { Type MessageType User string Text string }
type MessageType ¶
type MessageType int
const ( MessageTypeIncoming MessageType = iota MessageTypeOutgoing MessageTypeInfo MessageTypeError )
type ReceivedChatEvent ¶
type ReceivedChatEvent string
ReceivedChatEvent is fired when the user submits text in the chat input box.
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
func NewRenderer ¶
func NewRenderer() *Renderer
func (*Renderer) RequestFrame ¶
func (r *Renderer) RequestFrame()
type ResizeEvent ¶
ResizeEvent indicates that the terminal window's size has changed to the specified dimensions
type SentMessageEvent ¶
type SentMessageEvent string
SentMessageEvent fires after a message has been sent to the current partner