diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-02-05 14:42:56 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-17 19:13:40 +1100 |
commit | 482bdc4f1ea5448c5e98697ae66221e544ea40dd (patch) | |
tree | 7df478f9870e3dddc85f77d7b77439bed16e3c7b /pkg/gui/types | |
parent | 8e3484d8e98faf12f8395eaf5f9e8381f77a8e52 (diff) |
more refactoring
Diffstat (limited to 'pkg/gui/types')
-rw-r--r-- | pkg/gui/types/context.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pkg/gui/types/context.go b/pkg/gui/types/context.go index e4a11779e..381374adf 100644 --- a/pkg/gui/types/context.go +++ b/pkg/gui/types/context.go @@ -1,6 +1,9 @@ package types -import "github.com/jesseduffield/lazygit/pkg/config" +import ( + "github.com/jesseduffield/gocui" + "github.com/jesseduffield/lazygit/pkg/config" +) type ContextKind int @@ -10,6 +13,8 @@ const ( TEMPORARY_POPUP PERSISTENT_POPUP EXTRAS_CONTEXT + // only used by the one global context + GLOBAL_CONTEXT ) type ParentContexter interface { @@ -31,6 +36,8 @@ type IBaseContext interface { GetKeybindings(opts KeybindingsOpts) []*Binding AddKeybindingsFn(KeybindingsFn) + GetMouseKeybindings(opts KeybindingsOpts) []*gocui.ViewMouseBinding + AddMouseKeybindingsFn(MouseKeybindingsFn) } type Context interface { @@ -56,9 +63,11 @@ type KeybindingsOpts struct { } type KeybindingsFn func(opts KeybindingsOpts) []*Binding +type MouseKeybindingsFn func(opts KeybindingsOpts) []*gocui.ViewMouseBinding type HasKeybindings interface { GetKeybindings(opts KeybindingsOpts) []*Binding + GetMouseKeybindings(opts KeybindingsOpts) []*gocui.ViewMouseBinding } type IController interface { |