Add Application.RingBell

This commit is contained in:
Trevor Slocum 2020-01-16 18:25:24 -08:00
parent eff6577116
commit dbba9159b3
2 changed files with 9 additions and 0 deletions

View file

@ -1,5 +1,6 @@
v1.4.1 (WIP)
- Add ProgressBar widget
- Add Application.RingBell
v1.4.0 (2020-01-16)
- Bump version to resolve issues with "go get"

View file

@ -1,6 +1,7 @@
package cview
import (
"fmt"
"sync"
"time"
@ -745,3 +746,10 @@ func (a *Application) QueueEvent(event tcell.Event) *Application {
a.events <- event
return a
}
// RingBell sends a bell code to the terminal.
func (a *Application) RingBell() {
a.Lock()
fmt.Print(string(byte(7)))
a.Unlock()
}