From 482bdc4f1ea5448c5e98697ae66221e544ea40dd Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 5 Feb 2022 14:42:56 +1100 Subject: more refactoring --- pkg/gui/types/context.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'pkg/gui/types/context.go') 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 { -- cgit v1.2.3