interact

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeFM     = 0
	ModeMyFav  = 1
	ModeNormal = 2
	ModeIntel  = 3
	ModeDay    = 4
)

Play list modes

Variables

This section is empty.

Functions

func GetLyricCurrent

func GetLyricCurrent(player *control.Player, login *account.Login) string

GetLyricCurrent 获取当前播放歌曲的歌词

func ParseLyric

func ParseLyric(src string) map[int]LyricLine

ParseLyric 解析歌词

func ShowLyric

func ShowLyric(player *control.Player, login *account.Login, offset int)

ShowLyric 显示歌词

Types

type ClientApp

type ClientApp struct {
	ShouldClose     bool
	ShouldPrintMenu bool
	BindHandles     []func()
}

ClientApp 网易云客户端

func NewClientApp

func NewClientApp() *ClientApp

NewClientApp 创建新网易云客户端

func (*ClientApp) MainLoop

func (c *ClientApp) MainLoop(login *account.Login, player *control.Player)

MainLoop 客户端主循环

func (*ClientApp) PrintMenu

func (c *ClientApp) PrintMenu(Menu Menu)

PrintMenu 打印帮助菜单

func (*ClientApp) PrintPrefix

func (c *ClientApp) PrintPrefix(prefix string)

PrintPrefix 打印每行的前缀

type LyricLine

type LyricLine struct {
	Min     int
	Sec     int
	Content string
	Length  int
}

LyricLine 歌词行信息

type Menu struct {
	Items []string
}

Menu 帮助菜单

func (m *Menu) AddItem(value string) *Menu

AddItem 向帮助菜单中添加项目

Jump to

Keyboard shortcuts

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