webview / webview_go

Go language bindings for the webview library.
MIT License
176 stars 27 forks source link

Proposal: WebView.SetIcon #46

Open dark-pink opened 4 weeks ago

dark-pink commented 4 weeks ago

Add new method SetIcon to set window icon image.

Type and parameter IconKind allows to specify usage of icon (if supported).

// IconKind is used to specify usage of icon.
type IconKind int

const (
    IconKindDefault = IconKind(iota)
    IconKindSmaller
)

type WebView interface {
    // SetIcon updates the icon of the native window. Must be called from the UI
    // thread.
    SetIcon(icon image.Image, kind IconKind)

    // ...
}

Pull request: https://github.com/webview/webview_go/pull/47