app

package
v0.0.0-...-f7a83da Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Buttons = []struct {
	Value  Button
	TSName string
}{
	{A, "A"},
	{B, "B"},
	{Start, "START"},
	{Select, "SELECT"},
	{Up, "UP"},
	{Right, "RIGHT"},
	{Down, "DOWN"},
	{Left, "LEFT"},
}
View Source
var DisplayEvents = []struct {
	Value  RenderEvent
	TSName string
}{
	{Render, "RENDER"},
}
View Source
var Joypads = []struct {
	Value  Joypad
	TSName string
}{
	{Primary, "PRIMARY"},
	{Secondary, "SECONDARY"},
}

Functions

This section is empty.

Types

type App

type App struct {
	ContextHolder
}

App struct

func NewApp

func NewApp() *App

NewApp creates a new App application struct

func (*App) BeforeClose

func (a *App) BeforeClose(ctx context.Context) bool

beforeClose is called when the application is about to quit, either by clicking the window close button or calling runtime.Quit. Returning true will cause the application to continue, false will continue shutdown as normal.

func (App) DomReady

func (a App) DomReady(ctx context.Context)

domReady is called after front-end resources have been loaded

func (*App) Shutdown

func (a *App) Shutdown(ctx context.Context)

shutdown is called at application termination

type Button

type Button string
const (
	A      Button = "A"
	B      Button = "B"
	Start  Button = "START"
	Select Button = "SELECT"
	Up     Button = "UP"
	Right  Button = "RIGHT"
	Down   Button = "DOWN"
	Left   Button = "LEFT"
)

type ContextHolder

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

func (*ContextHolder) SetContext

func (c *ContextHolder) SetContext(ctx context.Context)

type Joypad

type Joypad string
const (
	Primary   Joypad = "PRIMARY"
	Secondary Joypad = "SECONDARY"
)

type RenderEvent

type RenderEvent string
const Render RenderEvent = "RENDER"

type WebviewAudioDriver

type WebviewAudioDriver struct {
	ContextHolder
}

func NewWebviewAudioDriver

func NewWebviewAudioDriver() *WebviewAudioDriver

type WebviewDisplayDriver

type WebviewDisplayDriver struct {
	ContextHolder
}

func NewWebviewDisplayDriver

func NewWebviewDisplayDriver() *WebviewDisplayDriver

type WebviewInputDriver

type WebviewInputDriver struct {
	ContextHolder
	// contains filtered or unexported fields
}

func NewWebviewInputDriver

func NewWebviewInputDriver() *WebviewInputDriver

func (*WebviewInputDriver) SetButton

func (w *WebviewInputDriver) SetButton(joypad Joypad, button Button, to bool)

Jump to

Keyboard shortcuts

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