launcher

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

README

HybridLauncher

API

package main

import (
    "net/http"
    "github.com/kerwin612/hybrid-launcher"
)

func main() {

    lch, err := launcher.New()
    if err != nil {
        panic(err)
    }

    http.HandleFunc("/exit", func (w http.ResponseWriter, r *http.Request) {
        w.WriteHeader(200)
        lch.Exit()
    })

    panic(lch.StartAndOpen())

}

For detailed instructions, see: examples

Try the example app

git clone git@github.com:kerwin612/hybrid-launcher.git
cd hybrid-launcher/examples/example1
go run main.go

Credits

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IconData []byte = []byte{}/* 35626 elements not displayed */

Functions

This section is empty.

Types

type Config

type Config struct {
	Ip          string
	Port        int
	Pid         string
	Icon        []byte
	Title       string
	Tooltip     string
	TrayOnReady func()
	OpenWith    func(string)
	RootHandler http.Handler
}

func DefaultConfig

func DefaultConfig() (*Config, error)

type Launcher added in v0.0.4

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

func New added in v0.0.4

func New() (*Launcher, error)

func NewWithConfig added in v0.0.4

func NewWithConfig(c *Config) (*Launcher, error)

func (*Launcher) Addr added in v0.0.4

func (l *Launcher) Addr() string

func (*Launcher) Exit added in v0.0.4

func (l *Launcher) Exit()

func (*Launcher) Open added in v0.0.4

func (l *Launcher) Open()

func (*Launcher) SetIcon added in v0.0.4

func (l *Launcher) SetIcon(icon []byte)

func (*Launcher) SetTitle added in v0.0.4

func (l *Launcher) SetTitle(title string)

func (*Launcher) SetTooltip added in v0.0.4

func (l *Launcher) SetTooltip(tooltip string)

func (*Launcher) Start added in v0.0.4

func (l *Launcher) Start() error

func (*Launcher) StartAndOpen added in v0.0.4

func (l *Launcher) StartAndOpen() error

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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