2019-07-12 10:12:15 +10:00
|
|
|
package interfaces
|
2019-01-08 07:58:46 +11:00
|
|
|
|
2019-07-12 10:12:15 +10:00
|
|
|
import (
|
|
|
|
|
"github.com/wailsapp/wails/lib/messages"
|
|
|
|
|
)
|
2019-11-27 22:55:19 +11:00
|
|
|
|
2019-01-08 07:58:46 +11:00
|
|
|
// Renderer is an interface describing a Wails target to render the app to
|
|
|
|
|
type Renderer interface {
|
2019-07-12 10:12:15 +10:00
|
|
|
Initialise(AppConfig, IPCManager, EventManager) error
|
2019-01-08 07:58:46 +11:00
|
|
|
Run() error
|
|
|
|
|
|
|
|
|
|
// Binding
|
|
|
|
|
NewBinding(bindingName string) error
|
|
|
|
|
|
|
|
|
|
// Events
|
2019-07-12 10:12:15 +10:00
|
|
|
NotifyEvent(eventData *messages.EventData) error
|
2019-01-08 07:58:46 +11:00
|
|
|
|
|
|
|
|
// Dialog Runtime
|
2020-06-17 19:09:09 +09:00
|
|
|
SelectFile(title string, filter string) string
|
2019-01-08 07:58:46 +11:00
|
|
|
SelectDirectory() string
|
2020-06-17 19:09:09 +09:00
|
|
|
SelectSaveFile(title string, filter string) string
|
2019-01-08 07:58:46 +11:00
|
|
|
|
|
|
|
|
// Window Runtime
|
|
|
|
|
SetColour(string) error
|
2021-04-02 13:14:09 +08:00
|
|
|
|
|
|
|
|
SetMinSize(width, height int)
|
|
|
|
|
SetMaxSize(width, height int)
|
|
|
|
|
|
2019-01-08 07:58:46 +11:00
|
|
|
Fullscreen()
|
|
|
|
|
UnFullscreen()
|
|
|
|
|
SetTitle(title string)
|
|
|
|
|
Close()
|
|
|
|
|
}
|