initial transparency

This commit is contained in:
Boof2015
2026-06-11 17:30:07 -04:00
parent c56b86ba63
commit 0ee95fe480
20 changed files with 753 additions and 27 deletions
+4
View File
@@ -4,4 +4,8 @@ export interface NativeWindowChromeAPI {
// was invalid or the subclass could not be installed. Windows-only; a no-op
// elsewhere.
applyFlatFrame: (nativeWindowHandle: Buffer) => boolean
// Accent-policy acrylic blur (SetWindowCompositionAttribute). Unlike the DWM
// system backdrop, the blur persists while the window is unfocused and works
// on borderless transparent windows. Windows-only; a no-op elsewhere.
setAcrylicBlurBehind: (nativeWindowHandle: Buffer, enable: boolean) => boolean
}
+1
View File
@@ -5,4 +5,5 @@ export interface WindowCapabilities {
useNativeDragRegions: boolean
supportsProgrammaticReposition: boolean
supportsGeometryPersistence: boolean
supportsBlurredBackground: boolean
}
+16
View File
@@ -4,10 +4,26 @@ import type { WindowBounds } from './popout'
export const WINDOW_LOCAL_STATE_FORMAT = 'prism-window-local'
export const WINDOW_LOCAL_STATE_VERSION = 1
export type WindowBackgroundMode = 'solid' | 'blurred' | 'clear'
export interface WindowBackgroundState {
mode: WindowBackgroundMode
/** How much of the desktop shows through the app background, 0-100. */
transparency: number
}
export interface WindowBackgroundSnapshot {
/** What the user chose (preserved even when the platform can't honor it). */
stored: WindowBackgroundState
/** What is actually applied after platform capability downgrades. */
effective: WindowBackgroundState
}
export interface PrismWindowLocalStateV1 {
format: typeof WINDOW_LOCAL_STATE_FORMAT
version: typeof WINDOW_LOCAL_STATE_VERSION
mainAlwaysOnTop: boolean
popoutAlwaysOnTop: Partial<Record<ScopeKind, boolean>>
nowPlayingConfigWindowBounds?: WindowBounds
windowBackground: WindowBackgroundState
}