-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.js
90 lines (86 loc) · 2.9 KB
/
index.js
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
const helpers = require('./src/helpers.js');
const notPlanned = helpers.notPlanned;
const notPlannedNodeDefaultApplicationProtocol = helpers.notPlannedNodeDefaultApplicationProtocol;
const api = {
on: notPlanned,
quit: notPlanned,
exit: notPlanned,
relaunch: notPlanned,
isReady: notPlanned,
whenReady: notPlanned,
focus: notPlanned,
hide: notPlanned,
show: notPlanned,
setAppLogsPath: notPlanned,
getAppPath: require('./src/api/getAppPath.js'),
getPath: require('./src/api/getPath.js'),
getFileIcon: notPlanned,
setPath: notPlanned,
getVersion: notPlanned,
getName: notPlanned,
setName: notPlanned,
getLocale: notPlanned,
getLocaleCountryCode: notPlanned,
addRecentDocument: notPlanned,
clearRecentDocuments: notPlanned,
setAsDefaultProtocolClient: notPlannedNodeDefaultApplicationProtocol,
removeAsDefaultProtocolClient: notPlannedNodeDefaultApplicationProtocol,
isDefaultProtocolClient: notPlannedNodeDefaultApplicationProtocol,
getApplicationNameForProtocol: notPlannedNodeDefaultApplicationProtocol,
setUserTasks: notPlanned,
getJumpListSettings: notPlanned,
setJumpList: notPlanned,
requestSingleInstanceLock: notPlanned,
hasSingleInstanceLock: notPlanned,
releaseSingleInstanceLock: notPlanned,
setUserActivity: notPlanned,
getCurrentActivityType: notPlanned,
invalidateCurrentActivity: notPlanned,
resignCurrentActivity: notPlanned,
updateCurrentActivity: notPlanned,
setAppUserModelId: notPlanned,
setActivationPolicy: notPlanned,
importCertificate: notPlanned,
disableHardwareAcceleration: notPlanned,
disableDomainBlockingFor3DAPIs: notPlanned,
getAppMetrics: notPlanned,
getGPUFeatureStatus: notPlanned,
getGPUInfo: notPlanned,
setBadgeCount: notPlanned,
getBadgeCount: notPlanned,
isUnityRunning: notPlanned,
getLoginItemSettings: notPlanned,
setLoginItemSettings: notPlanned,
isAccessibilitySupportEnabled: notPlanned,
setAccessibilitySupportEnabled: notPlanned,
showAboutPanel: notPlanned,
setAboutPanelOptions: notPlanned,
isEmojiPanelSupported: notPlanned,
showEmojiPanel: notPlanned,
startAccessingSecurityScopedResource: notPlanned,
enableSandbox: notPlanned,
isInApplicationsFolder: notPlanned,
moveToApplicationsFolder: notPlanned,
isSecureKeyboardEntryEnabled: notPlanned,
setSecureKeyboardEntryEnabled: notPlanned,
accessibilitySupportEnabled: notPlanned,
applicationMenu: notPlanned,
badgeCount: notPlanned,
commandLine: notPlanned,
dock: notPlanned,
isPackaged: notPlanned,
name: notPlanned,
userAgentFallback: notPlanned,
allowRendererProcessReuse: notPlanned
};
const app = function (win) {
if (win) {
global.win = win;
}
return api;
};
// Thought this would be cool, but unfortunately Electron's fucking garbage api uses the key "name", which is a reserved key on all functions and cannot be reassigned.
// for (let key in api) {
// app[key] = api[key];
// }
module.exports = app;