api

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KEYWORD_ROOT   = janet.Keyword("root")
	KEYWORD_REPLAY = janet.Keyword("replay")

	KEYWORD_RE = janet.Keyword("re")
)
View Source
var DOCS_CMD string
View Source
var DOCS_GROUP string
View Source
var DOCS_INPUT string
View Source
var DOCS_KEY string
View Source
var DOCS_PANE string
View Source
var DOCS_PATH string
View Source
var DOCS_REPLAY string
View Source
var DOCS_TREE string
View Source
var DOCS_VIEWPORT string

Functions

This section is empty.

Types

type Binding added in v0.1.11

type Binding struct {
	Node     tree.NodeID
	Sequence []string
	Function *janet.Value
}

func NewBinding added in v0.1.11

func NewBinding(node tree.Node, leaf trie.Leaf[bind.Action]) Binding

type Client

type Client interface {
	Attach(tree.Node) error
	Node() tree.Node
	Get(key string) (value interface{}, ok bool)
	Params() *params.Parameters
	OuterLayers() *screen.Layers
	Margins() *screen.Margins
	Frame() *frames.Framer
	Binds() []Binding
}

type CmdModule added in v0.1.10

type CmdModule struct {
	Lifetime    util.Lifetime
	Tree        *tree.Tree
	ReplayBinds *bind.BindScope
}

func (*CmdModule) Documentation added in v0.1.10

func (i *CmdModule) Documentation() string

func (*CmdModule) New added in v0.1.10

func (c *CmdModule) New(
	user interface{},
	groupId *janet.Value,
	cmdParams *janet.Named[CmdParams],
) (tree.NodeID, error)

func (*CmdModule) Path added in v0.1.10

func (c *CmdModule) Path(id *janet.Value) (*string, error)

type CmdParams

type CmdParams struct {
	Command string
	Args    []string
	Name    string
	Path    string
}

type FuzzyParams added in v0.1.6

type FuzzyParams struct {
	Prompt   string
	Full     bool
	Reverse  bool
	Animated *bool
	Headers  *[]string
}

type GroupModule

type GroupModule struct {
	Tree *tree.Tree
}

func (*GroupModule) Children

func (g *GroupModule) Children(parentId *janet.Value) ([]tree.NodeID, error)

func (*GroupModule) Documentation added in v0.1.6

func (i *GroupModule) Documentation() string

func (*GroupModule) Leaves added in v0.1.6

func (g *GroupModule) Leaves(parentId *janet.Value) ([]tree.NodeID, error)

func (*GroupModule) New

func (g *GroupModule) New(
	parentId *janet.Value,
	params *janet.Named[NodeParams],
) (tree.NodeID, error)

type InputModule added in v0.1.6

type InputModule struct {
	Lifetime util.Lifetime
	Tree     *tree.Tree
	Server   *server.Server
}

func (*InputModule) Documentation added in v0.1.6

func (i *InputModule) Documentation() string

func (*InputModule) Find added in v0.1.6

func (i *InputModule) Find(
	ctx context.Context,
	user interface{},
	choices *janet.Value,
	named *janet.Named[FuzzyParams],
) (interface{}, error)

type KeyModule added in v0.1.6

type KeyModule struct {
	Tree        *tree.Tree
	ReplayBinds *bind.BindScope
}

func (*KeyModule) Bind added in v0.1.6

func (k *KeyModule) Bind(target *janet.Value, sequence *janet.Value, callback *janet.Function) error

func (*KeyModule) Current added in v0.1.11

func (k *KeyModule) Current(user interface{}) []Binding

func (*KeyModule) Documentation added in v0.1.6

func (i *KeyModule) Documentation() string

func (*KeyModule) Get added in v0.1.11

func (k *KeyModule) Get(target *janet.Value) ([]Binding, error)

func (*KeyModule) Remap added in v0.1.11

func (k *KeyModule) Remap(target *janet.Value, from, to *janet.Value) error

func (*KeyModule) Unbind added in v0.1.11

func (k *KeyModule) Unbind(target *janet.Value, sequence *janet.Value) error

type NodeParams

type NodeParams struct {
	Name string
}

type PaneModule

type PaneModule struct {
	Tree *tree.Tree
}

func (*PaneModule) Attach

func (p *PaneModule) Attach(context interface{}, id *janet.Value) error

func (*PaneModule) Current

func (p *PaneModule) Current(context interface{}) *tree.NodeID

func (*PaneModule) Documentation added in v0.1.6

func (i *PaneModule) Documentation() string

type PathModule

type PathModule struct{}

func (*PathModule) Abs

func (p *PathModule) Abs(path string) (string, error)

func (*PathModule) Base

func (p *PathModule) Base(path string) string

func (*PathModule) Documentation added in v0.1.6

func (i *PathModule) Documentation() string

func (*PathModule) Glob added in v0.1.6

func (p *PathModule) Glob(pattern string) ([]string, error)

func (*PathModule) Join

func (p *PathModule) Join(elem []string) string

type ReplayModule added in v0.1.5

type ReplayModule struct {
	Lifetime util.Lifetime
	Tree     *tree.Tree
	Binds    *bind.BindScope
}

func (*ReplayModule) Beginning added in v0.1.5

func (m *ReplayModule) Beginning(context interface{}) error

func (*ReplayModule) Copy added in v0.1.5

func (m *ReplayModule) Copy(context interface{}) error

func (*ReplayModule) CursorDown added in v0.1.5

func (m *ReplayModule) CursorDown(context interface{}) error

func (*ReplayModule) CursorLeft added in v0.1.5

func (m *ReplayModule) CursorLeft(context interface{}) error

func (*ReplayModule) CursorRight added in v0.1.5

func (m *ReplayModule) CursorRight(context interface{}) error

func (*ReplayModule) CursorUp added in v0.1.5

func (m *ReplayModule) CursorUp(context interface{}) error

func (*ReplayModule) Documentation added in v0.1.6

func (i *ReplayModule) Documentation() string

func (*ReplayModule) End added in v0.1.5

func (m *ReplayModule) End(context interface{}) error

func (*ReplayModule) HalfPageDown added in v0.1.5

func (m *ReplayModule) HalfPageDown(context interface{}) error

func (*ReplayModule) HalfPageUp added in v0.1.5

func (m *ReplayModule) HalfPageUp(context interface{}) error

func (*ReplayModule) JumpAgain added in v0.1.6

func (m *ReplayModule) JumpAgain(context interface{}) error

func (*ReplayModule) JumpBackward added in v0.1.6

func (m *ReplayModule) JumpBackward(context interface{}, char string) error

func (*ReplayModule) JumpForward added in v0.1.6

func (m *ReplayModule) JumpForward(context interface{}, char string) error

func (*ReplayModule) JumpReverse added in v0.1.6

func (m *ReplayModule) JumpReverse(context interface{}) error

func (*ReplayModule) JumpToBackward added in v0.1.6

func (m *ReplayModule) JumpToBackward(context interface{}, char string) error

func (*ReplayModule) JumpToForward added in v0.1.6

func (m *ReplayModule) JumpToForward(context interface{}, char string) error

func (*ReplayModule) Open added in v0.1.6

func (m *ReplayModule) Open(
	groupId *janet.Value,
	path string,
) (tree.NodeID, error)

func (*ReplayModule) Quit added in v0.1.5

func (m *ReplayModule) Quit(context interface{}) error

func (*ReplayModule) ScrollDown added in v0.1.5

func (m *ReplayModule) ScrollDown(context interface{}) error

func (*ReplayModule) ScrollUp added in v0.1.5

func (m *ReplayModule) ScrollUp(context interface{}) error

func (*ReplayModule) SearchAgain added in v0.1.5

func (m *ReplayModule) SearchAgain(context interface{}) error

func (*ReplayModule) SearchBackward added in v0.1.5

func (m *ReplayModule) SearchBackward(context interface{}) error

func (*ReplayModule) SearchForward added in v0.1.5

func (m *ReplayModule) SearchForward(context interface{}) error

func (*ReplayModule) SearchReverse added in v0.1.5

func (m *ReplayModule) SearchReverse(context interface{}) error

func (*ReplayModule) Select added in v0.1.5

func (m *ReplayModule) Select(context interface{}) error

func (*ReplayModule) TimePlay added in v0.1.5

func (m *ReplayModule) TimePlay(context interface{}) error

func (*ReplayModule) TimePlaybackRate added in v0.1.5

func (m *ReplayModule) TimePlaybackRate(context interface{}, rate int) error

func (*ReplayModule) TimeStepBack added in v0.1.5

func (m *ReplayModule) TimeStepBack(context interface{}) error

func (*ReplayModule) TimeStepForward added in v0.1.5

func (m *ReplayModule) TimeStepForward(context interface{}) error

type TreeModule

type TreeModule struct {
	Tree *tree.Tree
}

func (*TreeModule) Documentation added in v0.1.6

func (i *TreeModule) Documentation() string

func (*TreeModule) Group

func (t *TreeModule) Group(id *janet.Value) bool

func (*TreeModule) Kill added in v0.1.1

func (t *TreeModule) Kill(id *janet.Value) error

func (*TreeModule) Name

func (t *TreeModule) Name(id *janet.Value) *string

func (*TreeModule) Pane

func (t *TreeModule) Pane(id *janet.Value) bool

func (*TreeModule) Parent

func (t *TreeModule) Parent(id *janet.Value) (*tree.NodeID, error)

func (*TreeModule) Path added in v0.1.6

func (t *TreeModule) Path(id *janet.Value) (*string, error)

func (*TreeModule) Renames

func (t *TreeModule) Renames() map[string]string

func (*TreeModule) Root

func (t *TreeModule) Root() tree.NodeID

func (*TreeModule) SetName

func (t *TreeModule) SetName(id *janet.Value, name string) error

type ViewportModule added in v0.1.6

type ViewportModule struct {
}

func (*ViewportModule) Documentation added in v0.1.6

func (i *ViewportModule) Documentation() string

func (*ViewportModule) GetFrames added in v0.1.6

func (c *ViewportModule) GetFrames(context interface{}) []string

func (*ViewportModule) SetFrame added in v0.1.6

func (c *ViewportModule) SetFrame(context interface{}, name string)

func (*ViewportModule) SetSize added in v0.1.6

func (c *ViewportModule) SetSize(context interface{}, size geom.Size)

func (*ViewportModule) Size added in v0.1.6

func (c *ViewportModule) Size(context interface{}) *geom.Vec2

Jump to

Keyboard shortcuts

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