cy

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KEYWORD_INFO  = janet.Keyword("info")
	KEYWORD_WARN  = janet.Keyword("warn")
	KEYWORD_ERROR = janet.Keyword("error")
)
View Source
var CY_BOOT_FILE []byte
View Source
var DOCS_CY string

Functions

This section is empty.

Types

type Client

type Client struct {
	deadlock.RWMutex
	util.Lifetime
	// contains filtered or unexported fields
}

func (*Client) Attach

func (c *Client) Attach(node tree.Node) error

func (*Client) Detach

func (c *Client) Detach(reason string) error

func (*Client) Frame added in v0.1.6

func (c *Client) Frame() *frames.Framer

func (*Client) Margins added in v0.1.6

func (c *Client) Margins() *screen.Margins

func (*Client) Node

func (c *Client) Node() tree.Node

func (*Client) OuterLayers added in v0.1.6

func (c *Client) OuterLayers() *screen.Layers

func (*Client) Params added in v0.1.6

func (c *Client) Params() *params.Parameters

func (*Client) Resize

func (c *Client) Resize(size geom.Vec2)

type ClientID added in v0.1.6

type ClientID = int32

type Connection

type Connection = ws.Client[P.Message]

type Cy

type Cy struct {
	util.Lifetime
	deadlock.RWMutex
	*janet.VM
	// contains filtered or unexported fields
}

func Start

func Start(ctx context.Context, options Options) (*Cy, error)

func (*Cy) HandleWSClient

func (c *Cy) HandleWSClient(conn ws.Client[P.Message])

func (*Cy) Shutdown

func (c *Cy) Shutdown() error

type CyModule added in v0.1.6

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

func (*CyModule) Detach added in v0.1.6

func (c *CyModule) Detach(user interface{})

func (*CyModule) Documentation added in v0.1.6

func (i *CyModule) Documentation() string

func (*CyModule) Get added in v0.1.6

func (c *CyModule) Get(user interface{}, key *janet.Value) (interface{}, error)

func (*CyModule) KillServer added in v0.1.6

func (c *CyModule) KillServer()

func (*CyModule) Log added in v0.1.6

func (c *CyModule) Log(level *janet.Value, text string) error

func (*CyModule) Paste added in v0.1.6

func (c *CyModule) Paste(user interface{})

func (*CyModule) Replay added in v0.1.6

func (c *CyModule) Replay(user interface{})

func (*CyModule) Set added in v0.1.6

func (c *CyModule) Set(user interface{}, key *janet.Value, value *janet.Value) error

func (*CyModule) Toast added in v0.1.6

func (c *CyModule) Toast(context interface{}, level *janet.Value, message string) error

type Environment added in v0.1.6

type Environment map[string]string

func (Environment) Default added in v0.1.6

func (e Environment) Default(key string, defaultValue string) string

func (Environment) Get added in v0.1.6

func (e Environment) Get(key string) (string, bool)

func (Environment) IsSet added in v0.1.6

func (e Environment) IsSet(key string) bool

type Options

type Options struct {
	// The initial Janet script, typically ~/.cyrc.janet.
	Config string
	// The default directory in which to store data (e.g. recorded sessions).
	DataDir string
	// The default shell
	Shell string
}

type ToastLogger added in v0.1.5

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

func NewToastLogger added in v0.1.5

func NewToastLogger(send func(toasts.Toast)) *ToastLogger

func (*ToastLogger) Error added in v0.1.5

func (t *ToastLogger) Error(msg string)

func (*ToastLogger) Info added in v0.1.5

func (t *ToastLogger) Info(msg string)

func (*ToastLogger) Send added in v0.1.5

func (t *ToastLogger) Send(toast toasts.Toast)

func (*ToastLogger) Warn added in v0.1.5

func (t *ToastLogger) Warn(msg string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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