Skip to content

Commit

Permalink
binding map PoC
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaq committed Oct 8, 2024
1 parent 0ab8111 commit 9a049d4
Show file tree
Hide file tree
Showing 4 changed files with 475 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/etk/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type RunCfg struct {
Frame *eval.Frame
MaxHeight int
Justify Justify
ContextFn func(Context)
}

type Justify uint8
Expand Down Expand Up @@ -52,6 +53,10 @@ func Run(f Comp, cfg RunCfg) (vals.Map, error) {
sc := Stateful(fm, f)
defer sc.Finish()

if cfg.ContextFn != nil {
cfg.ContextFn(Context{sc.g, nil})
}

for {
// Render.
h, w := tty.Size()
Expand Down
Loading

0 comments on commit 9a049d4

Please sign in to comment.