forked from ElectronNET/Electron.NET
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnativeTheme.js
More file actions
31 lines (31 loc) · 1.47 KB
/
Copy pathnativeTheme.js
File metadata and controls
31 lines (31 loc) · 1.47 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
"use strict";
const electron_1 = require("electron");
let electronSocket;
module.exports = (socket) => {
electronSocket = socket;
socket.on('nativeTheme-shouldUseDarkColors', () => {
const shouldUseDarkColors = electron_1.nativeTheme.shouldUseDarkColors;
electronSocket.emit('nativeTheme-shouldUseDarkColors-completed', shouldUseDarkColors);
});
socket.on('nativeTheme-shouldUseHighContrastColors', () => {
const shouldUseHighContrastColors = electron_1.nativeTheme.shouldUseHighContrastColors;
electronSocket.emit('nativeTheme-shouldUseHighContrastColors-completed', shouldUseHighContrastColors);
});
socket.on('nativeTheme-shouldUseInvertedColorScheme', () => {
const shouldUseInvertedColorScheme = electron_1.nativeTheme.shouldUseInvertedColorScheme;
electronSocket.emit('nativeTheme-shouldUseInvertedColorScheme-completed', shouldUseInvertedColorScheme);
});
socket.on('nativeTheme-getThemeSource', () => {
const themeSource = electron_1.nativeTheme.themeSource;
electronSocket.emit('nativeTheme-getThemeSource-completed', themeSource);
});
socket.on('nativeTheme-themeSource', (themeSource) => {
electron_1.nativeTheme.themeSource = themeSource;
});
socket.on('register-nativeTheme-updated', (id) => {
electron_1.nativeTheme.on('updated', () => {
electronSocket.emit('nativeTheme-updated' + id);
});
});
};
//# sourceMappingURL=nativeTheme.js.map