初步实现功能

This commit is contained in:
2025-08-06 14:15:15 +08:00
parent cbe3f72d1c
commit d57b5fb540
8 changed files with 3657 additions and 58 deletions

View File

@ -1,6 +1,9 @@
const { contextBridge, ipcRenderer } = require('electron')
contextBridge.exposeInMainWorld('electronAPI', {
playSound: (file) => ipcRenderer.send('play-sound', file),
showTooltip: (text) => ipcRenderer.send('show-tooltip', text)
playSound: (soundFile) => ipcRenderer.send('play-sound', soundFile),
showTooltip: (text) => ipcRenderer.send('show-tooltip', text),
onUpdatePosition: (callback) => {
ipcRenderer.on('update-position', (_, position) => callback(position))
}
})