-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpreload.js
More file actions
31 lines (29 loc) · 1.77 KB
/
Copy pathpreload.js
File metadata and controls
31 lines (29 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// All of the Node.js APIs are available in the preload process.
// It has the same sandbox as a Chrome extension.
const { contextBridge, ipcRenderer } = require('electron/renderer')
contextBridge.exposeInMainWorld('resolveAPI', {
// Page
openPage: (pageName) => ipcRenderer.invoke('resolve:openPage', pageName),
// Project
createProject: (projectName) => ipcRenderer.invoke('resolve:createProject', projectName),
saveProject: () => ipcRenderer.invoke('resolve:saveProject'),
openProject: (projectName) => ipcRenderer.invoke('resolve:openProject', projectName),
// Bin
createBin: (binName) => ipcRenderer.invoke('resolve:createBin', binName),
selectBin: (binName) => ipcRenderer.invoke('resolve:selectBin', binName),
deleteBin: (binName) => ipcRenderer.invoke('resolve:deleteBin', binName),
// Clips
addClips: (filePathsArray) => ipcRenderer.invoke('resolve:addClips', filePathsArray),
// Timeline
createTimeline: (timelineName) => ipcRenderer.invoke('resolve:createTimeline', timelineName),
selectTimeline: (timelineName) => ipcRenderer.invoke('resolve:selectTimeline', timelineName),
// Render
renderTimeline: (timelineName, renderPresetName, targetDirPath, targetClipName) => ipcRenderer.invoke('resolve:renderTimeline', timelineName, renderPresetName, targetDirPath, targetClipName),
// RenderPreset
getRenderPresets: () => ipcRenderer.invoke('resolve:getRenderPresets'),
// added by Alaric
makeEDL: (EDLtext) => ipcRenderer.invoke('resolve:makeEDL', EDLtext),
saveEDL: (EDLtext) => ipcRenderer.invoke('resolve:saveEDL', EDLtext),
saveXML: (XMLtext) => ipcRenderer.invoke('resolve:saveXML', XMLtext),
makeXML: (variableZ, annotationText) => ipcRenderer.invoke('resolve:makeXML', variableZ, annotationText)
})