import { n as ServiceHandle, t as ServiceClientOptions } from "../service-rpc-BugpSF7V.mjs"; import { a as NesVideoArea, i as NesState, n as NesConfig, o as NesVideoMode, r as NesGamepadState, t as NesAudioMode } from "../nes-types-DNzGSREH.mjs"; //#region src/nes/nes-client.d.ts /** Registered name (`helper::Nes::get_name()`). */ declare const NES_SERVICE_NAME = "NES"; /** RPC function names (`helper::Nes::FunctionId`). */ declare const NES_FUNCTIONS: { readonly Load: "Load"; readonly Start: "Start"; readonly Pause: "Pause"; readonly Resume: "Resume"; readonly Stop: "Stop"; readonly Reset: "Reset"; readonly Save: "Save"; readonly SetGamepadState: "SetGamepadState"; readonly GetState: "GetState"; }; type NesClientOptions = ServiceClientOptions; declare function isNesAvailable(options?: NesClientOptions): boolean; declare function openNes(options?: NesClientOptions): ServiceHandle; declare function closeNes(handle: ServiceHandle, options?: NesClientOptions): void; declare function loadNes(handle: ServiceHandle, config: NesConfig, options?: NesClientOptions): void; declare function startNes(handle: ServiceHandle, options?: NesClientOptions): void; declare function pauseNes(handle: ServiceHandle, options?: NesClientOptions): void; declare function resumeNes(handle: ServiceHandle, options?: NesClientOptions): void; declare function stopNes(handle: ServiceHandle, options?: NesClientOptions): void; declare function resetNes(handle: ServiceHandle, options?: NesClientOptions): void; declare function saveNes(handle: ServiceHandle, options?: NesClientOptions): void; declare function setNesGamepadState(handle: ServiceHandle, state: NesGamepadState, options?: NesClientOptions): void; declare function getNesState(handle: ServiceHandle, options?: NesClientOptions): NesState; //#endregion //#region src/nes/nes.d.ts type NesModuleOptions = NesClientOptions; /** * Inject a mock RPC host and reset the cached service handle (vitest / Node only). * * @param options - Client options, typically `{ host }` from `@brookesia/service/hosts/nes` */ declare function configure(options: NesModuleOptions): void; declare const nes: { /** @returns `true` when NES service is registered */available(): boolean; /** Release the NES service binding. */ close(): void; /** * Load a ROM image and optional save file. * * @param config - `{ rom_path, save_path, display_output_name, display_source_name? }` */ load(config: NesConfig): void; /** Start emulation (requires prior {@link load}). */ start(): void; /** Pause running emulation. */ pause(): void; /** Resume from paused state. */ resume(): void; /** Stop emulation. */ stop(): void; /** Reset to loaded-ROM state without unloading. */ reset(): void; /** Write save RAM to `save_path` from {@link load}. */ save(): void; /** * Push gamepad button state to the emulator. * * @param gamepad - `{ a, b, start, select, up, down, left, right, ... }` */ setGamepadState(gamepad: NesGamepadState): void; /** * @returns `'Idle'` | `'Loaded'` | `'Running'` | `'Paused'` | `'Stopped'` */ getState(): NesState; }; //#endregion export { NES_FUNCTIONS, NES_SERVICE_NAME, type NesAudioMode, type NesClientOptions, type NesConfig, type NesGamepadState, type ServiceHandle as NesHandle, type NesModuleOptions, type NesState, type NesVideoArea, type NesVideoMode, closeNes, configure, nes as default, getNesState, isNesAvailable, loadNes, openNes, pauseNes, resetNes, resumeNes, saveNes, setNesGamepadState, startNes, stopNes }; //# sourceMappingURL=index.d.mts.map