mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-28 18:22:42 -08:00
39 lines
1.0 KiB
TypeScript
39 lines
1.0 KiB
TypeScript
type OverlayShortcutsRuntimeLike = {
|
|
registerOverlayShortcuts: () => void;
|
|
unregisterOverlayShortcuts: () => void;
|
|
syncOverlayShortcuts: () => void;
|
|
refreshOverlayShortcuts: () => void;
|
|
};
|
|
|
|
export function createRegisterOverlayShortcutsHandler(deps: {
|
|
overlayShortcutsRuntime: OverlayShortcutsRuntimeLike;
|
|
}) {
|
|
return (): void => {
|
|
deps.overlayShortcutsRuntime.registerOverlayShortcuts();
|
|
};
|
|
}
|
|
|
|
export function createUnregisterOverlayShortcutsHandler(deps: {
|
|
overlayShortcutsRuntime: OverlayShortcutsRuntimeLike;
|
|
}) {
|
|
return (): void => {
|
|
deps.overlayShortcutsRuntime.unregisterOverlayShortcuts();
|
|
};
|
|
}
|
|
|
|
export function createSyncOverlayShortcutsHandler(deps: {
|
|
overlayShortcutsRuntime: OverlayShortcutsRuntimeLike;
|
|
}) {
|
|
return (): void => {
|
|
deps.overlayShortcutsRuntime.syncOverlayShortcuts();
|
|
};
|
|
}
|
|
|
|
export function createRefreshOverlayShortcutsHandler(deps: {
|
|
overlayShortcutsRuntime: OverlayShortcutsRuntimeLike;
|
|
}) {
|
|
return (): void => {
|
|
deps.overlayShortcutsRuntime.refreshOverlayShortcuts();
|
|
};
|
|
}
|