gioshare

package
v0.1.0 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 (
	// ErrNotAvailable is return when the current OS isn't supported.
	ErrNotAvailable = errors.New("current OS not supported")

	// ErrNotAvailableAction is return when the current Shareable item isn't supported.
	ErrNotAvailableAction = errors.New("current shareable item not supported")
)

Functions

func NewConfigFromViewEvent

func NewConfigFromViewEvent(w *app.Window, evt app.ViewEvent, title string) share.Config

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

func UpdateConfigFromFrameEvent

func UpdateConfigFromFrameEvent(config *share.Config, w *app.Window, evt system.FrameEvent)

func UpdateConfigFromViewEvent

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

Types

type ErrorEvent

type ErrorEvent struct {
	// contains filtered or unexported fields
}

ErrorEvent is issued when an error occurs.

func (ErrorEvent) ImplementsEvent

func (ErrorEvent) ImplementsEvent()

type Shareable

type Shareable interface {
	ImplementsShareable()
}

type TextOp

type TextOp struct {
	Tag   event.Tag
	Title string
	Text  string
}

TextOp represents the text to be shared.

func (TextOp) Add

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

func (TextOp) ImplementsShareable

func (o TextOp) ImplementsShareable()

type WebsiteOp

type WebsiteOp struct {
	Tag   event.Tag
	Title string
	Text  string
	Link  string
}

WebsiteOp represents the website/link to be shared.

func (WebsiteOp) Add

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

Add adds the WebsiteOp to the queue. The WebsiteOp will be executed on the next frame, showing the share dialog.

func (WebsiteOp) ImplementsShareable

func (o WebsiteOp) ImplementsShareable()

Jump to

Keyboard shortcuts

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