webview

package
v0.0.0-...-9688140 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendCallback

func SendCallback(id, result string)

func SendMessage

func SendMessage(message interface{}) bool

func Terminate

func Terminate()

Types

type BoxWebviewOptions

type BoxWebviewOptions struct {
	ID                     string
	URL                    string
	Pathname               string
	IconData               []byte
	InjectedJS             string
	AppName                string
	Title                  string
	Width                  int
	Height                 int
	Mux                    http.Handler
	FrontendFS             fs.FS
	HandleMessage          Handler
	HandleDragDrop         DragDropHandler
	QuitOnLastWindowClosed bool
}

type DragDropHandler

type DragDropHandler func(event string, payload string)

type Handler

type Handler func(message string) (id string, result string)

type Webview

type Webview struct{}

func OpenWebview

func OpenWebview(opts *BoxWebviewOptions) *Webview

func OpenWindow

func OpenWindow(opts *BoxWebviewOptions) *Webview

func (*Webview) Close

func (w *Webview) Close()

func (*Webview) Fullscreen

func (w *Webview) Fullscreen()

func (*Webview) GetPosition

func (w *Webview) GetPosition() (int, int)

func (*Webview) GetSize

func (w *Webview) GetSize() (int, int)

func (*Webview) Hide

func (w *Webview) Hide()

func (*Webview) Maximize

func (w *Webview) Maximize()

func (*Webview) Minimize

func (w *Webview) Minimize()

func (*Webview) Restore

func (w *Webview) Restore()

func (*Webview) SetAlwaysOnTop

func (w *Webview) SetAlwaysOnTop(onTop bool)

func (*Webview) SetMaxSize

func (w *Webview) SetMaxSize(width, height int)

func (*Webview) SetMinSize

func (w *Webview) SetMinSize(width, height int)

func (*Webview) SetPosition

func (w *Webview) SetPosition(x, y int)

func (*Webview) SetSize

func (w *Webview) SetSize(width, height int)

func (*Webview) SetTitle

func (w *Webview) SetTitle(title string)

func (*Webview) SetURL

func (w *Webview) SetURL(url string)

func (*Webview) Show

func (w *Webview) Show()

func (*Webview) UnFullscreen

func (w *Webview) UnFullscreen()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL