gwapp

package
v0.0.0-...-2f48622 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package gwapp implements application initialization and message loop that can be used in any goroutine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GwApp

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

func New

func New() *GwApp

New creates a GwApp and do application initialization.

func (*GwApp) Post

func (app *GwApp) Post(f func()) error

Post put f into the UI message queue, f will run in the UI thread ASAP.

func (*GwApp) Quit

func (app *GwApp) Quit(exitCode int)

Quit calls win32.PostQuitMessage which tells the message loop to exit. The exit code will be the return value of Run.

func (*GwApp) Run

func (app *GwApp) Run() int

Run runs the message loop.

Jump to

Keyboard shortcuts

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