mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-25 00:11:26 -07:00
feat(core): add Electron runtime, services, and app composition
This commit is contained in:
38
src/main/runtime/overlay-shortcuts-lifecycle.ts
Normal file
38
src/main/runtime/overlay-shortcuts-lifecycle.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
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();
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user