Documentation
¶
Index ¶
- type LaunchBoxAdditionalApp
- type LaunchBoxGameInfo
- type LaunchBoxPipeServer
- func (s *LaunchBoxPipeServer) IsConnected() bool
- func (s *LaunchBoxPipeServer) LaunchGame(gameID string) error
- func (s *LaunchBoxPipeServer) RequestGamesForPlatformSync(ctx context.Context, platform string) ([]LaunchBoxGameInfo, error)
- func (s *LaunchBoxPipeServer) RequestPlatforms() error
- func (s *LaunchBoxPipeServer) SetCommandErrorHandler(handler func(command, message string))
- func (s *LaunchBoxPipeServer) SetGameExitedHandler(handler func(id, title string))
- func (s *LaunchBoxPipeServer) SetGameProcessHandler(handler func(id string, pid int))
- func (s *LaunchBoxPipeServer) SetGameStartedHandler(handler func(id, title, platform, path string, pid int))
- func (s *LaunchBoxPipeServer) SetPlatformsReceivedHandler(handler func(plats []launchBoxPlatformInfo))
- func (s *LaunchBoxPipeServer) SetWriteRequestHandler(handler func(id, title, platform string))
- func (s *LaunchBoxPipeServer) Start() error
- func (s *LaunchBoxPipeServer) Stop()
- func (s *LaunchBoxPipeServer) StopGame(ctx context.Context, gameID string) error
- func (s *LaunchBoxPipeServer) SupportsStop() bool
- type Platform
- func (p *Platform) ClearTrackedProcessMedia(proc *os.Process) bool
- func (p *Platform) ClearTrackedProcessPID(pid int) bool
- func (*Platform) ConsoleManager() platforms.ConsoleManager
- func (*Platform) ForwardCmd(_ *platforms.CmdEnv) (platforms.CmdResult, error)
- func (*Platform) GamepadPress(_ string) error
- func (*Platform) ID() string
- func (*Platform) KeyboardPress(_ string) error
- func (p *Platform) LaunchMedia(cfg *config.Instance, path string, launcher *platforms.Launcher, ...) error
- func (*Platform) LaunchSystem(_ *config.Instance, _ string) error
- func (p *Platform) Launchers(cfg *config.Instance) []platforms.Launcher
- func (*Platform) LookupMapping(_ *tokens.Token) (string, bool)
- func (*Platform) ManagedByPackageManager() bool
- func (p *Platform) NewLaunchBoxLauncher() platforms.Launcher
- func (*Platform) ReturnToMenu() error
- func (*Platform) RootDirs(cfg *config.Instance) []string
- func (*Platform) ScanHook(_ *tokens.Token) error
- func (*Platform) Scrapers(_ *config.Instance) map[string]platforms.Scraper
- func (*Platform) Screenshot() (*platforms.ScreenshotResult, error)
- func (p *Platform) SetTrackedProcess(proc *os.Process)
- func (*Platform) Settings() platforms.Settings
- func (p *Platform) StartPost(_ context.Context, cfg *config.Instance, ...) error
- func (*Platform) StartPre(_ *config.Instance) error
- func (p *Platform) Stop() error
- func (p *Platform) StopActiveLauncher(_ platforms.StopIntent) error
- func (p *Platform) SupportedReaders(cfg *config.Instance) []readers.Reader
- func (p *Platform) WaitTrackedProcess(proc *os.Process) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LaunchBoxAdditionalApp ¶ added in v2.9.0
LaunchBoxAdditionalApp represents an additional application for a LaunchBox game
type LaunchBoxGameInfo ¶ added in v2.9.0
type LaunchBoxGameInfo struct {
ID string `json:"Id"`
Title string `json:"Title"`
Platform string `json:"Platform"`
AdditionalApps []LaunchBoxAdditionalApp `json:"AdditionalApps"`
}
LaunchBoxGameInfo represents a game from the LaunchBox plugin
type LaunchBoxPipeServer ¶ added in v2.7.0
type LaunchBoxPipeServer struct {
// contains filtered or unexported fields
}
LaunchBoxPipeServer manages named pipe communication with the LaunchBox plugin
func NewLaunchBoxPipeServer ¶ added in v2.7.0
func NewLaunchBoxPipeServer() *LaunchBoxPipeServer
NewLaunchBoxPipeServer creates a new named pipe server
func (*LaunchBoxPipeServer) IsConnected ¶ added in v2.7.0
func (s *LaunchBoxPipeServer) IsConnected() bool
IsConnected returns true if the LaunchBox plugin is connected
func (*LaunchBoxPipeServer) LaunchGame ¶ added in v2.7.0
func (s *LaunchBoxPipeServer) LaunchGame(gameID string) error
LaunchGame sends a launch command to the LaunchBox plugin
func (*LaunchBoxPipeServer) RequestGamesForPlatformSync ¶ added in v2.9.0
func (s *LaunchBoxPipeServer) RequestGamesForPlatformSync( ctx context.Context, platform string, ) ([]LaunchBoxGameInfo, error)
RequestGamesForPlatformSync sends a GetGamesForPlatform command and waits for the response. This is used by the scanner to query games on-demand per-platform instead of caching all games.
func (*LaunchBoxPipeServer) RequestPlatforms ¶ added in v2.9.0
func (s *LaunchBoxPipeServer) RequestPlatforms() error
RequestPlatforms sends a GetPlatforms command to the LaunchBox plugin
func (*LaunchBoxPipeServer) SetCommandErrorHandler ¶ added in v2.17.2
func (s *LaunchBoxPipeServer) SetCommandErrorHandler(handler func(command, message string))
SetCommandErrorHandler sets the callback for plugin command failures.
func (*LaunchBoxPipeServer) SetGameExitedHandler ¶ added in v2.7.0
func (s *LaunchBoxPipeServer) SetGameExitedHandler(handler func(id, title string))
SetGameExitedHandler sets the callback for game exited events
func (*LaunchBoxPipeServer) SetGameProcessHandler ¶ added in v2.17.2
func (s *LaunchBoxPipeServer) SetGameProcessHandler(handler func(id string, pid int))
SetGameProcessHandler sets the callback for a resolved game process.
func (*LaunchBoxPipeServer) SetGameStartedHandler ¶ added in v2.7.0
func (s *LaunchBoxPipeServer) SetGameStartedHandler(handler func(id, title, platform, path string, pid int))
SetGameStartedHandler sets the callback for game started events
func (*LaunchBoxPipeServer) SetPlatformsReceivedHandler ¶ added in v2.9.0
func (s *LaunchBoxPipeServer) SetPlatformsReceivedHandler(handler func(plats []launchBoxPlatformInfo))
SetPlatformsReceivedHandler sets the callback for platforms received events
func (*LaunchBoxPipeServer) SetWriteRequestHandler ¶ added in v2.7.0
func (s *LaunchBoxPipeServer) SetWriteRequestHandler(handler func(id, title, platform string))
SetWriteRequestHandler sets the callback for write request events
func (*LaunchBoxPipeServer) Start ¶ added in v2.7.0
func (s *LaunchBoxPipeServer) Start() error
Start begins listening for LaunchBox plugin connections
func (*LaunchBoxPipeServer) Stop ¶ added in v2.7.0
func (s *LaunchBoxPipeServer) Stop()
Stop gracefully shuts down the pipe server
func (*LaunchBoxPipeServer) StopGame ¶ added in v2.17.2
func (s *LaunchBoxPipeServer) StopGame(ctx context.Context, gameID string) error
StopGame asks the plugin to stop a running game and waits for the result. Going through the plugin rather than killing the process directly lets LaunchBox run its own shutdown path, including the emulator's configured exit script.
func (*LaunchBoxPipeServer) SupportsStop ¶ added in v2.17.2
func (s *LaunchBoxPipeServer) SupportsStop() bool
SupportsStop reports whether the connected plugin can stop a running game.
type Platform ¶
type Platform struct {
// contains filtered or unexported fields
}
func (*Platform) ClearTrackedProcessMedia ¶ added in v2.16.0
ClearTrackedProcessMedia clears active media only when proc is still the latest completed launch.
func (*Platform) ClearTrackedProcessPID ¶ added in v2.17.2
ClearTrackedProcessPID forgets a completed externally-owned process without signalling it. The PID check prevents a stale lifecycle event from clearing a newer tracked process.
func (*Platform) ConsoleManager ¶ added in v2.7.0
func (*Platform) ConsoleManager() platforms.ConsoleManager
func (*Platform) ForwardCmd ¶
func (*Platform) GamepadPress ¶
func (*Platform) KeyboardPress ¶
func (*Platform) LaunchMedia ¶
func (*Platform) ManagedByPackageManager ¶ added in v2.10.0
func (*Platform) NewLaunchBoxLauncher ¶ added in v2.7.0
NewLaunchBoxLauncher creates the LaunchBox launcher
func (*Platform) ReturnToMenu ¶ added in v2.7.0
func (*Platform) Screenshot ¶ added in v2.10.0
func (*Platform) Screenshot() (*platforms.ScreenshotResult, error)
func (*Platform) SetTrackedProcess ¶ added in v2.6.1
SetTrackedProcess adopts proc as the process Core will stop next.
Note this kills whatever was previously tracked: replacing the tracked process is how a new launch preempts the old one. Callers that merely want to forget a process must use ClearTrackedProcessPID instead.
func (*Platform) StopActiveLauncher ¶
func (p *Platform) StopActiveLauncher(_ platforms.StopIntent) error
func (*Platform) SupportedReaders ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package windowfocus activates windows created by launched Windows processes.
|
Package windowfocus activates windows created by launched Windows processes. |