docs: add JSDoc comments to window factory functions

This commit is contained in:
Scott Lexium
2026-04-10 12:28:47 +01:00
parent e7d82e1478
commit 0bde359421
+13
View File
@@ -17,6 +17,11 @@ ipcMain.on("hud-overlay-hide", () => {
}
});
/**
* Creates the always-on-top HUD overlay window centred at the bottom of the
* primary display. The window is frameless, transparent, and follows the user
* across macOS Spaces so it is never lost when switching virtual desktops.
*/
export function createHudOverlayWindow(): BrowserWindow {
const primaryDisplay = screen.getPrimaryDisplay();
const { workArea } = primaryDisplay;
@@ -80,6 +85,10 @@ export function createHudOverlayWindow(): BrowserWindow {
return win;
}
/**
* Creates the main editor window. Starts maximised with a hidden title bar on
* macOS. This window is not always-on-top and appears in the taskbar/dock.
*/
export function createEditorWindow(): BrowserWindow {
const isMac = process.platform === "darwin";
@@ -126,6 +135,10 @@ export function createEditorWindow(): BrowserWindow {
return win;
}
/**
* Creates the floating source-selector window used to pick a screen or window
* to record. Frameless, transparent, and follows the user across macOS Spaces.
*/
export function createSourceSelectorWindow(): BrowserWindow {
const { width, height } = screen.getPrimaryDisplay().workAreaSize;