summaryrefslogtreecommitdiff
path: root/gocui.go
diff options
context:
space:
mode:
Diffstat (limited to 'gocui.go')
-rw-r--r--gocui.go29
1 files changed, 0 insertions, 29 deletions
diff --git a/gocui.go b/gocui.go
index dec6d20..05672ec 100644
--- a/gocui.go
+++ b/gocui.go
@@ -12,35 +12,6 @@ import (
"go.wit.com/log"
)
-// This initializes the gocui package
-// it runs SetManagerFunc which passes every input
-// event (keyboard, mouse, etc) to the function "gocuiEvent()"
-func gocuiMain() {
- g, err := gocui.NewGui(gocui.OutputNormal, true)
- if err != nil {
- panic(err)
- }
- defer g.Close()
-
- me.baseGui = g
-
- g.Cursor = true
- g.Mouse = true
-
- // this sets the function that is run on every event. For example:
- // When you click the mouse, move the mouse, or press a key on the keyboard
- // This is equivalent to xev or similar to cat /dev/input on linux
- g.SetManagerFunc(gocuiEvent)
-
- if err := defaultKeybindings(g); err != nil {
- panic(err)
- }
-
- if err := g.MainLoop(); err != nil && !errors.Is(err, gocui.ErrQuit) {
- panic(err)
- }
-}
-
// Thanks to the gocui developers -- your package kicks ass
// This function is called on every event. It is a callback function from the gocui package
// which has an excellent implementation. While gocui handles things like text highlighting