Migrate handleOpenFile to dialog.TaskOpenFile IPC, handleSaveFile/handleRun/ handleBuild to ActionIDECommand IPC. Remove DialogManager, EnvManager, EventManager interfaces and wailsDialogManager, wailsEnvManager, wailsEventManager adapter structs. App interface now has Quit() + Logger() only. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
29 lines
712 B
Go
29 lines
712 B
Go
// pkg/display/interfaces.go
|
|
package display
|
|
|
|
import "github.com/wailsapp/wails/v3/pkg/application"
|
|
|
|
// App abstracts the Wails application for the orchestrator.
|
|
// After Spec D cleanup, only Quit() and Logger() remain —
|
|
// all other Wails Manager APIs are accessed via IPC.
|
|
type App interface {
|
|
Logger() Logger
|
|
Quit()
|
|
}
|
|
|
|
// Logger wraps Wails logging.
|
|
type Logger interface {
|
|
Info(message string, args ...any)
|
|
}
|
|
|
|
// wailsApp wraps *application.App for the App interface.
|
|
type wailsApp struct {
|
|
app *application.App
|
|
}
|
|
|
|
func newWailsApp(app *application.App) App {
|
|
return &wailsApp{app: app}
|
|
}
|
|
|
|
func (w *wailsApp) Logger() Logger { return w.app.Logger }
|
|
func (w *wailsApp) Quit() { w.app.Quit() }
|