api

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KEYWORD_ROOT = janet.Keyword("root")
	KEYWORD_TIME = janet.Keyword("time")
	KEYWORD_COPY = janet.Keyword("copy")

	KEYWORD_RE = janet.Keyword("re")
)
View Source
var DOCS_CMD string
View Source
var DOCS_EXEC 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 BindParams added in v0.1.16

type BindParams struct {
	Tag string
}

type Binding added in v0.1.11

type Binding struct {
	Tag      string
	Sequence []string
	Function *janet.Value
}

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
	TimeBinds, CopyBinds *bind.BindScope
}

func (*CmdModule) Commands added in v0.1.13

func (c *CmdModule) Commands(id *janet.Value) (*[]detect.Command, error)

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 ExecModule added in v0.1.13

type ExecModule struct {
	Server Server
}

func (*ExecModule) Documentation added in v0.1.13

func (i *ExecModule) Documentation() string

func (*ExecModule) File added in v0.1.13

func (e *ExecModule) File(path string) error

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
	TimeBinds, CopyBinds *bind.BindScope
}

func (*KeyModule) Bind added in v0.1.6

func (k *KeyModule) Bind(
	target *janet.Value,
	sequence *janet.Value,
	callback *janet.Function,
	bindParams *janet.Named[BindParams],
) 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

func (*PaneModule) Screen added in v0.1.13

func (p *PaneModule) Screen(id *janet.Value) ([]string, error)

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
	TimeBinds, CopyBinds *bind.BindScope
}

func (*ReplayModule) Beginning added in v0.1.5

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

func (*ReplayModule) BigWordBackward added in v0.1.17

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

func (*ReplayModule) BigWordEndBackward added in v0.1.17

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

func (*ReplayModule) BigWordEndForward added in v0.1.17

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

func (*ReplayModule) BigWordForward added in v0.1.17

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

func (*ReplayModule) CommandBackward added in v0.1.13

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

func (*ReplayModule) CommandForward added in v0.1.13

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

func (*ReplayModule) CommandSelectBackward added in v0.1.17

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

func (*ReplayModule) CommandSelectForward added in v0.1.17

func (m *ReplayModule) CommandSelectForward(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) EndOfLine added in v0.1.13

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

func (*ReplayModule) EndOfScreenLine added in v0.1.13

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

func (*ReplayModule) FirstNonBlank added in v0.1.13

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

func (*ReplayModule) FirstNonBlankScreen added in v0.1.13

func (m *ReplayModule) FirstNonBlankScreen(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) LastNonBlank added in v0.1.13

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

func (*ReplayModule) LastNonBlankScreen added in v0.1.13

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

func (*ReplayModule) MiddleOfLine added in v0.1.13

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

func (*ReplayModule) MiddleOfScreenLine added in v0.1.13

func (m *ReplayModule) MiddleOfScreenLine(context interface{}) 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) StartOfLine added in v0.1.13

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

func (*ReplayModule) StartOfScreenLine added in v0.1.13

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

func (*ReplayModule) SwapScreen added in v0.1.13

func (m *ReplayModule) SwapScreen(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

func (*ReplayModule) WordBackward added in v0.1.17

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

func (*ReplayModule) WordEndBackward added in v0.1.17

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

func (*ReplayModule) WordEndForward added in v0.1.17

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

func (*ReplayModule) WordForward added in v0.1.17

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

type Server added in v0.1.13

type Server interface {
	ExecuteJanet(path string) 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