Documentation
¶
Index ¶
- Constants
- Variables
- func BMPFileComplete(path string) (bool, error)
- func IsCustomScheme(scheme string) bool
- func IsStandardSchemeForDecoding(scheme string) bool
- func PNGFileComplete(path string) (bool, error)
- func SchemeIDTest(scheme string) func(*config.Instance, string) bool
- func ScreenshotFileComplete(path, ext string) (bool, error)
- func ShouldDecodeURIScheme(scheme string) bool
- func StandardSchemesForDecoding() []string
- func ValidCustomSchemes() []string
- type GamepadDevice
- type InputManager
- func (l *InputManager) CloseDevices()
- func (l *InputManager) GamepadPress(name string) error
- func (l *InputManager) GamepadPressSequence(args []string, interKeyDelay time.Duration) error
- func (l *InputManager) InitDevices(cfg *config.Instance, gamepadEnabledByDefault bool) error
- func (l *InputManager) KeyboardPress(arg string) error
- func (l *InputManager) KeyboardPressSequence(args []string, interKeyDelay time.Duration) error
- func (l *InputManager) NewInputSession() platforms.InputSession
- type KeyboardDevice
Constants ¶
const ( LauncherKodiLocalVideo = "KodiLocalVideo" LauncherKodiLocalAudio = "KodiLocalAudio" LauncherKodiMovie = "KodiMovie" LauncherKodiTVEpisode = "KodiTVEpisode" LauncherKodiTVShow = "KodiTVShow" LauncherKodiSong = "KodiSong" LauncherKodiAlbum = "KodiAlbum" LauncherKodiArtist = "KodiArtist" )
Kodi launcher IDs
const ( LauncherGroupNative = "Native" LauncherGroupEmuDeck = "EmuDeck" LauncherGroupRetroDECK = "RetroDECK" LauncherGroupRetroAchievements = "RetroAchievements" LauncherGroupKodi = "Kodi" LauncherGroupKodiTV = "KodiTV" LauncherGroupKodiMusic = "KodiMusic" )
Launcher groups used as stable configuration references.
const ( LauncherGroupDB9 = "DB9" LauncherGroupLLAPI = "LLAPI" LauncherGroupDualRAM = "DualRAM" LauncherGroupSinden = "Sinden" LauncherGroupPWM = "PWM" LauncherGroupUnstable = "Unstable" )
MiSTer alt-core launcher groups. Each name matches a family of cores published by a distinct MiSTer downloader database, so a user can prefer a whole family at once with a single [launchers] preference entry.
const ( SchemeSteam = "steam" SchemeFlashpoint = "flashpoint" SchemeLaunchBox = "launchbox" SchemeScummVM = "scummvm" SchemeLutris = "lutris" SchemeHeroic = "heroic" SchemeBottles = "bottles" SchemeFaugus = "faugus" SchemeGOG = "gog" SchemePopper = "popper" )
Custom URI scheme constants for Zaparoo virtual paths. These schemes are used to create virtual paths for media that doesn't have traditional file paths (e.g., Steam games, Kodi media, LaunchBox collections, etc.).
const ( SchemeKodiMovie = "kodi-movie" SchemeKodiEpisode = "kodi-episode" SchemeKodiSong = "kodi-song" SchemeKodiAlbum = "kodi-album" SchemeKodiArtist = "kodi-artist" SchemeKodiShow = "kodi-show" )
Kodi URI scheme constants for Kodi media library items.
const ( SchemeHTTP = "http" SchemeHTTPS = "https" )
Standard URI schemes that should have URL decoding applied.
const DefaultInputDelay = 40 * time.Millisecond
DefaultInputDelay is the pause held between the down and up of a single press, to avoid overloading the OS or user applications.
const DefaultInterKeyDelay = 100 * time.Millisecond
DefaultInterKeyDelay is the default pause between consecutive key presses in a sequence. Matches the inter-key delay used by the per-key fallback loop.
Variables ¶
var ErrGamepadDisabled = errors.New("virtual gamepad is disabled")
ErrGamepadDisabled reports that virtual gamepad support is switched off.
var ErrInputUnsupported = errors.New("virtual input is not supported on this platform")
ErrInputUnsupported is returned by InitDevices on platforms with no virtual input backend.
Functions ¶
func BMPFileComplete ¶ added in v2.11.0
BMPFileComplete checks the file size against the total size declared at bytes 2-5 of the BMP header (little-endian uint32).
func IsCustomScheme ¶
IsCustomScheme checks if the given scheme is a registered Zaparoo custom URI scheme
func IsStandardSchemeForDecoding ¶
IsStandardSchemeForDecoding checks if the given scheme is a standard URI scheme that should have URL decoding
func PNGFileComplete ¶ added in v2.11.0
func SchemeIDTest ¶ added in v2.18.0
SchemeIDTest builds a Launcher.Test that accepts only paths carrying a usable ID for this scheme.
A launcher that declares Schemes and no Test is selected for anything with the right prefix, and DoLaunch stops the running media as soon as a launcher is chosen. Without this, a malformed path takes down whatever is playing and only then fails inside Launch. Every scheme launcher whose Launch parses an ID out of the path wants this; those that hand the whole path to an external opener (the browser launchers) reject nothing and so need nothing.
func ScreenshotFileComplete ¶ added in v2.11.0
ScreenshotFileComplete avoids reading a partial file when inotify fires before the writer has flushed and closed.
func ShouldDecodeURIScheme ¶
ShouldDecodeURIScheme checks if the given scheme should have URL decoding applied Returns true for Zaparoo custom schemes and standard web schemes (http/https)
func StandardSchemesForDecoding ¶
func StandardSchemesForDecoding() []string
StandardSchemesForDecoding returns a slice of standard URI schemes that should have URL decoding
func ValidCustomSchemes ¶
func ValidCustomSchemes() []string
ValidCustomSchemes returns a slice of all registered Zaparoo custom URI schemes
Types ¶
type GamepadDevice ¶ added in v2.18.0
GamepadDevice is a virtual gamepad backend. Codes are raw evdev button codes from gamepadmap.
type InputManager ¶ added in v2.18.0
type InputManager struct {
NewKeyboard func() (KeyboardDevice, error)
NewGamepad func() (GamepadDevice, error)
// contains filtered or unexported fields
}
InputManager owns the virtual keyboard and gamepad devices and the input held on them. Embed it in platform implementations that support input.
The backend constructors default to the platform's native implementation and exist so tests can inject recording devices.
func (*InputManager) CloseDevices ¶ added in v2.18.0
func (l *InputManager) CloseDevices()
CloseDevices releases all held input before closing keyboard and gamepad devices.
func (*InputManager) GamepadPress ¶ added in v2.18.0
func (l *InputManager) GamepadPress(name string) error
GamepadPress sends a gamepad button press.
func (*InputManager) GamepadPressSequence ¶ added in v2.18.0
func (l *InputManager) GamepadPressSequence(args []string, interKeyDelay time.Duration) error
GamepadPressSequence sends a request-scoped gamepad sequence. Explicit press tokens are always released before this method returns.
func (*InputManager) InitDevices ¶ added in v2.18.0
func (l *InputManager) InitDevices(cfg *config.Instance, gamepadEnabledByDefault bool) error
InitDevices initializes keyboard and optionally gamepad based on config. gamepadEnabledByDefault controls the default when config doesn't specify.
func (*InputManager) KeyboardPress ¶ added in v2.18.0
func (l *InputManager) KeyboardPress(arg string) error
KeyboardPress sends a keyboard key press.
func (*InputManager) KeyboardPressSequence ¶ added in v2.18.0
func (l *InputManager) KeyboardPressSequence(args []string, interKeyDelay time.Duration) error
KeyboardPressSequence sends a request-scoped key sequence. Explicit press tokens are always released before this method returns.
func (*InputManager) NewInputSession ¶ added in v2.18.0
func (l *InputManager) NewInputSession() platforms.InputSession
NewInputSession creates an isolated owner for input held across API requests.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package esapi provides types and helpers for reading EmulationStation gamelist.xml files.
|
Package esapi provides types and helpers for reading EmulationStation gamelist.xml files. |
|
Package esde provides shared utilities for EmulationStation Desktop Edition based platforms including ES-DE, Batocera ES, and RetroBat.
|
Package esde provides shared utilities for EmulationStation Desktop Edition based platforms including ES-DE, Batocera ES, and RetroBat. |
|
Package esmedia resolves local EmulationStation-style media folders and paths.
|
Package esmedia resolves local EmulationStation-style media folders and paths. |
|
gamescope
Package gamescope makes externally launched windows visible and focused in gamescope Gaming Mode sessions.
|
Package gamescope makes externally launched windows visible and focused in gamescope Gaming Mode sessions. |
|
procscanner
Package procscanner provides a shared process scanner for monitoring multiple types of processes with a single /proc scan.
|
Package procscanner provides a shared process scanner for monitoring multiple types of processes with a single /proc scan. |
|
proctracker
Package proctracker provides process exit tracking using pidfd_open on Linux 5.3+.
|
Package proctracker provides process exit tracking using pidfd_open on Linux 5.3+. |
|
Package linuxemu provides reusable emulator discovery and launchers for Linux-family platforms.
|
Package linuxemu provides reusable emulator discovery and launchers for Linux-family platforms. |
|
Zaparoo Core Copyright (c) 2026 The Zaparoo Project Contributors.
|
Zaparoo Core Copyright (c) 2026 The Zaparoo Project Contributors. |
|
Package retroarch provides reusable RetroArch CLI launchers.
|
Package retroarch provides reusable RetroArch CLI launchers. |
|
steamtracker
Package steamtracker provides Steam game lifecycle tracking on Linux.
|
Package steamtracker provides Steam game lifecycle tracking on Linux. |