webview

package module
v0.0.0-...-13df59b Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: ISC Imports: 2 Imported by: 3

README

Go Webview Selector

This library is a tiny shim that provides access to a native webview for a given platform. It selects between two implementations:

  • On Windows, go-webview2 will be chosen. It embeds a copy of WebView2Loader, so it should work out of the box on any setup that has the WebView 2 runtime installed, which should include up-to-date Windows 10 installations and Windows 11. (As well, WebView 2 runtime is available going backwards to Windows 7.) This library does not require CGo and thus will build and run with CGO_ENABLED=0.

  • On other operating systems, webview/webview will be used. This runtime requires CGo, but supports a wide variety of platforms.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hint

type Hint = webview.Hint
const (
	// HintNone specifies that width and height are default size
	HintNone Hint = iota

	// HintFixed specifies that window size can not be changed by a user
	HintFixed

	// HintMin specifies that width and height are minimum bounds
	HintMin

	// HintMax specifies that width and height are maximum bounds
	HintMax
)

type WebView

type WebView = webview.WebView

func New

func New(debug bool) WebView

New creates a new webview in a new window.

func NewWindow

func NewWindow(debug bool, window unsafe.Pointer) WebView

NewWindow creates a new webview using an existing window.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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