mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 14:10:58 +08:00

* [316-multi-bridge-conn] feat: use callback func for bridge response * [316-multi-bridge-conn] feat: implement multiple session support * split client handling portion into 'session' * keep track of sessions by remote address (ip & port) * notify each of the sessions anytime an event comes across the bus * [316-multi-bridge-conn] chore: move bridge files to package * [316-multi-bridge-conn] chore: remove deprecated Callback function The Callback function is no longer needed for the operation of the frontend callback since the ipc.Dispatch function now requires a callback function to be provided as an argument. This function can be a private function since it is passed by reference. * [316-multi-bridge-conn] chore: make webview.Callback private * [316-multi-bridge-conn] chore: remove unused injectCSS function I believe a slightly better method of doing this might need to be devised if it is needed in the future. I presume it should collect the values into a cache and then inject it into each sesssion as it appears. * [316-multi-bridge-conn] ensure wails:ready event is emitted Event is only emitted for the first session created from the Bridge. * [316-multi-bridge-conn] emit events for session lifecycle Emit an event for each session started and ended. * [316-multi-bridge-conn] fix: session handling fixes Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
31 lines
575 B
Go
31 lines
575 B
Go
package interfaces
|
|
|
|
import (
|
|
"github.com/wailsapp/wails/lib/messages"
|
|
)
|
|
|
|
// Renderer is an interface describing a Wails target to render the app to
|
|
type Renderer interface {
|
|
Initialise(AppConfig, IPCManager, EventManager) error
|
|
Run() error
|
|
EnableConsole()
|
|
|
|
// Binding
|
|
NewBinding(bindingName string) error
|
|
|
|
// Events
|
|
NotifyEvent(eventData *messages.EventData) error
|
|
|
|
// Dialog Runtime
|
|
SelectFile() string
|
|
SelectDirectory() string
|
|
SelectSaveFile() string
|
|
|
|
// Window Runtime
|
|
SetColour(string) error
|
|
Fullscreen()
|
|
UnFullscreen()
|
|
SetTitle(title string)
|
|
Close()
|
|
}
|