cy

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 28 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_INFO  = janet.Keyword("info")
	KEYWORD_WARN  = janet.Keyword("warn")
	KEYWORD_ERROR = janet.Keyword("error")
)
View Source
var CY_BOOT_FILE []byte

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) Node

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

func (*Client) Resize

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

type Connection

type Connection = ws.Client[P.Message]

type Cy

type Cy struct {
	util.Lifetime
	deadlock.RWMutex
	// 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 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
}

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