player

package
v0.0.0-...-b786051 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: Unlicense Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Stopped playerState = iota
	Playing
	Paused
)

Variables

This section is empty.

Functions

func Contains

func Contains(arr []string, input string) bool

func Control

func Control(songList []Track, pathPrefix int)

func DrawRectangle

func DrawRectangle(gtx *layout.Context, w, h int, color color.RGBA, borderRadius [4]float32, inset unit.Value)

func HexARGB

func HexARGB(s string) (c color.RGBA)

Types

type GoJoy

type GoJoy struct {
	Window   *app.Window
	Context  *layout.Context
	Theme    *gelook.DuoUItheme
	Menu     *MenuBar
	Layouts  *Layouts
	Playlist *Playlist
	Playing  *Track

	OnSelect selectCallback
	OnPause  pauseCallback
	OnSeek   seekCallback
	OnVolume volumeCallback

	Sound *Sound
	// contains filtered or unexported fields
}

func NewGoJoy

func NewGoJoy() *GoJoy

func (*GoJoy) Info

func (g *GoJoy) Info() func()

func (*GoJoy) LoadPlaylist

func (g *GoJoy) LoadPlaylist() *Playlist

func (*GoJoy) MenuBar

func (g *GoJoy) MenuBar() *MenuBar

func (*GoJoy) MenuBarLayout

func (g *GoJoy) MenuBarLayout(gtx *layout.Context, th *gelook.DuoUItheme, ly *layout.Flex) func()

func (*GoJoy) TrackList

func (g *GoJoy) TrackList() func()

func (*GoJoy) View

func (g *GoJoy) View() func()

type Layouts

type Layouts struct {
	Main *layout.Flex
	Menu *layout.Flex
	Body *layout.Flex
	Info *layout.Flex

	Playlist  *layout.List
	Track     *layout.Flex
	TrackInfo *layout.Flex
}
type MenuBar struct {
	PlayPause *gel.Button
	Stop      *gel.Button
	Forward   *gel.Button
	Backward  *gel.Button
	Next      *gel.Button
	Back      *gel.Button
	Quit      *gel.Button
}

MenuBar is the component that define the menu bar.

type Playlist

type Playlist struct {
	TracksNumber int
	Buttons      map[int]*gel.Button
	Tracks       map[int]Track
}

type ScrollBarBody

type ScrollBarBody struct {
	Do           func(interface{})
	ColorBg      string
	BgImage      image.Image
	BgImageOp    paint.ImageOp
	Position     float32
	Cursor       float32
	OperateValue interface{}
	Width        int
	CursorHeight float32
	// contains filtered or unexported fields
}

type ScrollerGauge

type ScrollerGauge struct {
	Label   string
	Value   int
	Control func(i int)

	ColorBg      string
	BorderRadius [4]float32
	OperateValue interface{}
	// contains filtered or unexported fields
}

func (*ScrollerGauge) Layout

func (s *ScrollerGauge) Layout(gtx *layout.Context)

type ScrollerGaugeButton

type ScrollerGaugeButton struct {
	Height float32
	// contains filtered or unexported fields
}

func (*ScrollerGaugeButton) ScrollerGaugeButton

func (s *ScrollerGaugeButton) ScrollerGaugeButton() *gelook.IconButton

type Sound

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

type Track

type Track struct {
	Id           int
	Filename     string
	Artist       string
	Title        string
	Album        string
	TrackNumber  int
	TrackTotal   int
	Genre        string
	Year         string
	CoverImage   image.Image
	CoverImageOp paint.ImageOp
	Path         string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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