Checkpoint

This commit is contained in:
maze authored and maze committed 2026-10-29 17:29:41 +01:00
1 parent 85a9ec684c
commit c5d6137fab
160 files changed
+76293 -387

No files matched your search

+67
View File
@@ -0,0 +1,67 @@
package app
import (
"image"
"github.com/BeatGlow/beatglow/player"
"github.com/BeatGlow/display"
)
type Layout interface {
String() string
// Widgets used by this screen.
Widgets() []Widget
}
type Context interface {
// Display is the display driver.
Display() display.Display
// Player is the music player.
Player() player.Player
// Track is the current track playing.
Track() *player.Track
}
type Widget interface {
String() string
// Bounds is the bounding box.
Bounds() image.Rectangle
// Move the drawable to a new position on the screen.
Move(image.Point) Widget
// Resize changes the widget's size.
Resize(image.Point) Widget
// Hide the drawable.
Hide(Context) Widget
// Show the drawable.
Show(Context) Widget
// IsVisible checks if the drawable is visible.
IsVisible() bool
Refresh(Context) Widget
}
type RotaryInputHandler interface {
HandleRotary(delta int)
}
type ButtonInputHandler interface {
HandleButtonPress()
HandleButtonLongPress()
}
type StatusChangeHandler interface {
StatusChanged(*player.Status)
}
type TrackChangeHandler interface {
TrackChanged(*player.Track)
}