giohyperlink

package
v0.0.0-...-3331d8c Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: BSD-3-Clause, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotReady may occur when try to open a URL before the initialization is done.
	ErrNotReady = errors.New("some needed library was not loaded yet, make use that you are using ListenEvents()")
	// ErrInvalidURL occur when provide an invalid URL, like a non http/https URL.
	ErrInvalidURL = errors.New("given url is invalid")
)
View Source
var (
	// InsecureIgnoreScheme will remove any attempt to validate the URL
	// It's "false" by default. Set it to "true" if you are using a custom scheme (like "myapp://").
	InsecureIgnoreScheme bool
)

Functions

func NewConfigFromViewEvent

func NewConfigFromViewEvent(w *app.Window, evt app.ViewEvent) hyperlink.Config

NewConfigFromViewEvent creates a share.Config based on app.ViewEvent.

func UpdateConfigFromStageEvent

func UpdateConfigFromStageEvent(config *hyperlink.Config, _ *app.Window, evt system.StageEvent)

func UpdateConfigFromViewEvent

func UpdateConfigFromViewEvent(config *hyperlink.Config, w *app.Window, evt app.ViewEvent)

Types

type ErrorEvent

type ErrorEvent struct {
	Error error
}

ErrorEvent is issued when an error occurs.

func (ErrorEvent) ImplementsEvent

func (e ErrorEvent) ImplementsEvent()

ImplementsEvent implements event.Event.

type OpenOp

type OpenOp struct {
	Tag event.Tag
	URI *url.URL
}

OpenOp is an operation that will open a URL.

func (OpenOp) Add

func (o OpenOp) Add(ops *op.Ops)

Add adds an OpenOp to the queue. It will open the given URL at the end of the frame.

Jump to

Keyboard shortcuts

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