@@ -208,6 +208,22 @@ unsafe extern "C" { |
| 208 | 208 | /// through to the window beneath. Equivalent to NSWindow's |
| 209 | 209 | /// `setIgnoresMouseEvents(true)` at the SLS layer. |
| 210 | 210 | pub fn SLSSetWindowEventShape(cid: CGSConnectionID, wid: u32, shape: CFTypeRef) -> CGError; |
| 211 | + /// NSWindowSharingType for the SLS window: 0 = None (excluded from |
| 212 | + /// screen capture / picker / recording), 1 = ReadOnly, 2 = ReadWrite. |
| 213 | + /// Tahoe's exported symbol is `SLSSetWindowSharingState` (not `Type`). |
| 214 | + /// Setting 0 makes the overlay invisible to ScreenCaptureKit, the |
| 215 | + /// cmd+shift+4 + space picker, etc., so user screenshots fall through |
| 216 | + /// to the underlying app window. |
| 217 | + pub fn SLSSetWindowSharingState(cid: CGSConnectionID, wid: u32, state: u32) -> CGError; |
| 218 | + /// Marks the SLS window as a non-standard "perceived type" so that |
| 219 | + /// screen-capture clients can choose to skip it. Yabai/skhd use this |
| 220 | + /// to keep borders out of screenshots without poisoning SLSNewWindow |
| 221 | + /// (unlike tag bits). Type 2 = "popup", 13/14 = system overlays. |
| 222 | + pub fn SLSSetWindowClientPerceivedType( |
| 223 | + cid: CGSConnectionID, |
| 224 | + wid: u32, |
| 225 | + kind: u32, |
| 226 | + ) -> CGError; |
| 211 | 227 | pub fn SLSSetWindowAlpha(cid: CGSConnectionID, wid: u32, alpha: f32) -> CGError; |
| 212 | 228 | pub fn SLSSetWindowBackgroundBlurRadius(cid: CGSConnectionID, wid: u32, radius: u32) |
| 213 | 229 | -> CGError; |
@@ -255,6 +271,18 @@ unsafe extern "C" { |
| 255 | 271 | y_offset: f32, |
| 256 | 272 | shape: CFTypeRef, |
| 257 | 273 | ) -> CGError; |
| 274 | + /// Sets a window's actual bounds region (what the window-server |
| 275 | + /// considers part of the window for hit-testing, capture, and |
| 276 | + /// rendering) using a CGPath instead of a CGS region. Lets us |
| 277 | + /// install a donut-shaped region without needing a multi-rect |
| 278 | + /// region constructor — none of which exist in linkable form on |
| 279 | + /// Tahoe except `CGSNewRegionWithRect` (single rect). |
| 280 | + pub fn SLSTransactionSetWindowBoundsPath( |
| 281 | + transaction: CFTypeRef, |
| 282 | + cid: CGSConnectionID, |
| 283 | + wid: u32, |
| 284 | + path: CGPathRef, |
| 285 | + ) -> CGError; |
| 258 | 286 | |
| 259 | 287 | // Flicker suppression |
| 260 | 288 | pub fn SLSDisableUpdate(cid: CGSConnectionID) -> CGError; |