internal

package
v0.0.0-...-5d475a2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 53 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LastTimeCursorMove = [2]int{int(time.Now().UnixMicro()), 0} //nolint: gochecknoglobals // TODO: Move to model struct

These represent model's state information, its not a global preperty

View Source
var SampleDataBytes = []byte("This is sample") //nolint: gochecknoglobals // Effectively const

Functions

func ExecuteTeaCmdWithTimeout

func ExecuteTeaCmdWithTimeout(cmd tea.Cmd, timeout time.Duration) tea.Msg

func InitialModel

func InitialModel(firstFilePanelDirs []string, firstUseCheck, hasTrashCheck bool) tea.Model

Initialize and return model with default configs It returns only tea.Model because when it used in main, the return value is passed to tea.NewProgram() which accepts tea.Model Either way type 'model' is not exported, so there is not way main package can be aware of it, and use it directly

func IsTeaQuit

func IsTeaQuit(cmd tea.Cmd) bool

Is the command tea.quit, or a batch that contains tea.quit

func TeaUpdate

func TeaUpdate(m *model, msg tea.Msg) (tea.Cmd, error)

TeaUpdate : Utility to send update to model , majorly used in tests Not using pointer receiver as this is more like a utility, than a member function of model TODO : Should we validate that returned value is of type *model ? and equal to m ? We are assuming that to be true as of now

func TeaUpdateWithErrCheck

func TeaUpdateWithErrCheck(m *model, msg tea.Msg) tea.Cmd

Types

type BaseMessage

type BaseMessage struct {
	// contains filtered or unexported fields
}

func (BaseMessage) GetReqID

func (msg BaseMessage) GetReqID() int

type CompressOperationMsg

type CompressOperationMsg struct {
	BaseMessage
	// contains filtered or unexported fields
}

func NewCompressOperationMsg

func NewCompressOperationMsg(state processbar.ProcessState, reqID int) CompressOperationMsg

func (CompressOperationMsg) ApplyToModel

func (msg CompressOperationMsg) ApplyToModel(m *model) tea.Cmd

type DeleteOperationMsg

type DeleteOperationMsg struct {
	BaseMessage
	// contains filtered or unexported fields
}

func NewDeleteOperationMsg

func NewDeleteOperationMsg(state processbar.ProcessState, reqID int) DeleteOperationMsg

func (DeleteOperationMsg) ApplyToModel

func (msg DeleteOperationMsg) ApplyToModel(m *model) tea.Cmd

type ExtractOperationMsg

type ExtractOperationMsg struct {
	BaseMessage
	// contains filtered or unexported fields
}

func NewExtractOperationMsg

func NewExtractOperationMsg(state processbar.ProcessState, reqID int) ExtractOperationMsg

func (ExtractOperationMsg) ApplyToModel

func (msg ExtractOperationMsg) ApplyToModel(m *model) tea.Cmd

type IgnorerWriter

type IgnorerWriter struct{}

func (IgnorerWriter) Write

func (w IgnorerWriter) Write(p []byte) (int, error)

type MetadataMsg

type MetadataMsg struct {
	BaseMessage
	// contains filtered or unexported fields
}

func NewMetadataMsg

func NewMetadataMsg(meta metadata.Metadata, reqID int) MetadataMsg

func (MetadataMsg) ApplyToModel

func (msg MetadataMsg) ApplyToModel(m *model) tea.Cmd

type ModelUpdateMessage

type ModelUpdateMessage interface {
	ApplyToModel(m *model) tea.Cmd
	GetReqID() int
}

type NotifyModalUpdateMsg

type NotifyModalUpdateMsg struct {
	BaseMessage
	// contains filtered or unexported fields
}

func NewNotifyModalMsg

func NewNotifyModalMsg(m notify.Model, reqID int) NotifyModalUpdateMsg

func (NotifyModalUpdateMsg) ApplyToModel

func (msg NotifyModalUpdateMsg) ApplyToModel(m *model) tea.Cmd

type PasteOperationMsg

type PasteOperationMsg struct {
	BaseMessage
	// contains filtered or unexported fields
}

func NewPasteOperationMsg

func NewPasteOperationMsg(state processbar.ProcessState, reqID int) PasteOperationMsg

func (PasteOperationMsg) ApplyToModel

func (msg PasteOperationMsg) ApplyToModel(m *model) tea.Cmd

type ProcessBarUpdateMsg

type ProcessBarUpdateMsg struct {
	BaseMessage
	// contains filtered or unexported fields
}

func (ProcessBarUpdateMsg) ApplyToModel

func (msg ProcessBarUpdateMsg) ApplyToModel(m *model) tea.Cmd

type TeaProg

type TeaProg struct {
	// contains filtered or unexported fields
}

func NewTeaProg

func NewTeaProg(m *model, eventLoop bool) *TeaProg

If you use this, make sure to handle cleanup

func NewTestTeaProgWithEventLoop

func NewTestTeaProgWithEventLoop(t *testing.T, m *model) *TeaProg

func (*TeaProg) Close

func (p *TeaProg) Close()

func (*TeaProg) Send

func (p *TeaProg) Send(msgs ...tea.Msg)

func (*TeaProg) SendDirectly

func (p *TeaProg) SendDirectly(msgs ...tea.Msg) tea.Cmd

Dont use eventloop and dont care about the tea.Cmd returned by Update()

func (*TeaProg) SendKey

func (p *TeaProg) SendKey(key string)

func (*TeaProg) SendKeyDirectly

func (p *TeaProg) SendKeyDirectly(key string) tea.Cmd

func (*TeaProg) StartEventLoop

func (p *TeaProg) StartEventLoop()

Directories

Path Synopsis
ui
Package xdnd implements the X11 XDND drag-and-drop source protocol.
Package xdnd implements the X11 XDND drag-and-drop source protocol.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL