MCPcopy
hub / github.com/SPlayer-Dev/SPlayer / create

Method create

electron/main/windows/load-window.ts:26–50  ·  view source on GitHub ↗

* 创建窗口 * @returns BrowserWindow | null

()

Source from the content-addressed store, hash-verified

24 * @returns BrowserWindow | null
25 */
26 create(): BrowserWindow | null {
27 this.win = createWindow({
28 width: 800,
29 height: 560,
30 maxWidth: 800,
31 maxHeight: 560,
32 resizable: false,
33 alwaysOnTop: true,
34 // 不在任务栏显示
35 skipTaskbar: true,
36 // 窗口不能最小化
37 minimizable: false,
38 // 窗口不能最大化
39 maximizable: false,
40 // 窗口不能进入全屏状态
41 fullscreenable: false,
42 show: false,
43 });
44 if (!this.win) return null;
45 // 加载地址
46 this.win.loadURL(this.winURL);
47 // 窗口事件
48 this.event();
49 return this.win;
50 }
51 /**
52 * 获取窗口
53 * @returns BrowserWindow | null

Callers 3

constructorMethod · 0.45
initWindowsIpcFunction · 0.45
initLyricIpcFunction · 0.45

Calls 2

eventMethod · 0.95
createWindowFunction · 0.90

Tested by

no test coverage detected