diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2022-09-14 14:09:40 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-09-14 22:12:37 +0200 |
commit | 17c4781911a16c4f0d13dfbad4fab89db283dd54 (patch) | |
tree | 9843746b380aadb8a1b354b9657cc640b72c58d8 /lib/ui | |
parent | ee7937d0dd9201fdb78f363ddc8af950d0778f1b (diff) | |
download | aerc-17c4781911a16c4f0d13dfbad4fab89db283dd54.tar.gz |
ui: export context.viewport, screen.show, add SetCursorStyle
Export context.viewport for use in implementing tcell-term.
Bump tcell version to enable SetCursorStyle feature. Add this function
to the ui for future use with tcell-term.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib/ui')
-rw-r--r-- | lib/ui/context.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/ui/context.go b/lib/ui/context.go index fc2104df..859dab71 100644 --- a/lib/ui/context.go +++ b/lib/ui/context.go @@ -112,6 +112,10 @@ func (ctx *Context) SetCursor(x, y int) { ctx.screen.ShowCursor(ctx.x+x, ctx.y+y) } +func (ctx *Context) SetCursorStyle(cs tcell.CursorStyle) { + ctx.screen.SetCursorStyle(cs) +} + func (ctx *Context) HideCursor() { ctx.screen.HideCursor() } @@ -125,3 +129,11 @@ func (ctx *Context) Popover(x, y, width, height int, d Drawable) { content: d, }) } + +func (ctx *Context) View() *views.ViewPort { + return ctx.viewport +} + +func (ctx *Context) Show() { + ctx.screen.Show() +} |