OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
games.game_launcher_if.GameLauncherIf Class Reference

Launch and manage one external game process at a time. More...

Inheritance diagram for games.game_launcher_if.GameLauncherIf:
games.game_launcher.GameLauncher

Public Member Functions

int|None process_id (self)
 Return the active child process identifier.
None launch (self, GameDefinition game, Sequence[str]|None command=None, Callable[[], None]|None on_exit=None)
 Launch a game or raise if another game is already running.
None stop (self)
 Stop the currently running game, if any.
bool is_running (self)
 Return whether the launched game process is alive.

Detailed Description

Launch and manage one external game process at a time.

Member Function Documentation

◆ is_running()

bool games.game_launcher_if.GameLauncherIf.is_running ( self)

Return whether the launched game process is alive.

Returns
True while the launched game process is alive, otherwise False.

Reimplemented in games.game_launcher.GameLauncher.

◆ launch()

None games.game_launcher_if.GameLauncherIf.launch ( self,
GameDefinition game,
Sequence[str] | None command = None,
Callable[[], None] | None on_exit = None )

Launch a game or raise if another game is already running.

Parameters
gameConfigured game definition to launch.
commandOptional backend-specific command override.
on_exitCallback invoked on the process watcher thread after exit.

Reimplemented in games.game_launcher.GameLauncher.

◆ process_id()

int | None games.game_launcher_if.GameLauncherIf.process_id ( self)

Return the active child process identifier.

Returns
Process identifier or None when no child is running.

Reimplemented in games.game_launcher.GameLauncher.


The documentation for this class was generated from the following file:
  • controllers/games/game_launcher_if.py