gp

package
v0.0.0-...-5364436 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GPlayerAction_Stop      gplayerAction = iota
	GPlayerAction_Playpause               //toggle
	GPlayerAction_Playstop                //toggle
	GPlayerAction_Play
	GPlayerAction_Pause
	//
	GPlayerConfig_SetMaxIndex
	GPlayerConfig_Direction
	//
	GPlayerAction_Next
	GPlayerAction_Previous
	GPlayerAction_Seek
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GPlayer

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

func NewPlayer

func NewPlayer(onFrame func(int, bool)) *GPlayer

for the callback: the first parameter is the index it should show the 2nd parameter says if you should block on it for prev, next and seek for example, we want to immediatly return for the play-along player we want to want to display the animation with the right speed

func (*GPlayer) Cursor

func (gp *GPlayer) Cursor() int

func (*GPlayer) SendEvent

func (gp *GPlayer) SendEvent(action gplayerAction, args ...int) GPlayerStatus

fixme technically this thing needs to be mutexed to safety, but unless someone makes tests or misuses it, i am not going to spend time on that, unless it happens to me if the issue comes, we need to stop the player, do the sets, then resume or go the cheapest way and mutexlock the play(), do the sets, and unlock them how expensive even is taking locks for fun?

type GPlayerStatus

type GPlayerStatus int
const (
	GPlayerStatus_Stopped GPlayerStatus = iota
	GPlayerStatus_Playing
	GPlayerStatus_Paused
	//
	GPlayerStatus_ArgCountMismatch
	GplayerStatus_EmptyPlaylist
	GPlayerStatus_OK
	GplayerStatus_Confused
)

Jump to

Keyboard shortcuts

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