mirror of
https://github.com/Boof2015/prism.git
synced 2026-08-20 20:39:59 +02:00
initial transparency
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -5,4 +5,5 @@ export interface WindowCapabilities {
|
||||
useNativeDragRegions: boolean
|
||||
supportsProgrammaticReposition: boolean
|
||||
supportsGeometryPersistence: boolean
|
||||
supportsBlurredBackground: boolean
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user