[v3] NewWebviewWindow* return *WebviewWindow

This commit is contained in:
Travis McLane 2023-09-28 13:30:10 -05:00
commit 1c48d567e1
2 changed files with 3 additions and 3 deletions

View file

@ -340,7 +340,7 @@ func (a *App) RegisterHook(eventType events.ApplicationEventType, callback func(
}
}
func (a *App) NewWebviewWindow() Window {
func (a *App) NewWebviewWindow() *WebviewWindow {
return a.NewWebviewWindowWithOptions(WebviewWindowOptions{})
}
@ -376,7 +376,7 @@ func (a *App) error(message string, args ...any) {
}
}
func (a *App) NewWebviewWindowWithOptions(windowOptions WebviewWindowOptions) Window {
func (a *App) NewWebviewWindowWithOptions(windowOptions WebviewWindowOptions) *WebviewWindow {
newWindow := NewWindow(windowOptions)
id := newWindow.ID()

View file

@ -159,7 +159,7 @@ func (w *WebviewWindow) setupEventMapping() {
}
// NewWindow creates a new window with the given options
func NewWindow(options WebviewWindowOptions) Window {
func NewWindow(options WebviewWindowOptions) *WebviewWindow {
if options.Width == 0 {
options.Width = 800
}