2022-02-05 05:42:56 +02:00
|
|
|
package controllers
|
|
|
|
|
|
|
|
import "github.com/jesseduffield/lazygit/pkg/gui/types"
|
|
|
|
|
|
|
|
func AttachControllers(context types.Context, controllers ...types.IController) {
|
|
|
|
for _, controller := range controllers {
|
|
|
|
context.AddKeybindingsFn(controller.GetKeybindings)
|
|
|
|
context.AddMouseKeybindingsFn(controller.GetMouseKeybindings)
|
2022-02-27 02:42:22 +02:00
|
|
|
context.AddOnClickFn(controller.GetOnClick())
|
2022-12-30 14:24:24 +02:00
|
|
|
context.AddOnRenderToMainFn(controller.GetOnRenderToMain())
|
|
|
|
context.AddOnFocusFn(controller.GetOnFocus())
|
|
|
|
context.AddOnFocusLostFn(controller.GetOnFocusLost())
|
2022-02-05 05:42:56 +02:00
|
|
|
}
|
|
|
|
}
|