Open numist opened 1 year ago
Now that I've had some time to noodle on this, I think that WindowInfo
needs to become a protocol, as should the interface that provides window content images. To aid in transition (and testing) it might be worth also protocolizing the window list publisher types (and making them actors). This way WindowInfoGroup
can conform to WindowInfo
/WindowContents
and the existing struct WindowInfo
can stick around as a value type used by both the unit tests and the CG window list publisher.
lol I guess this just got more important. sigh.
ScreenCaptureKit is the new blessèd way to capture screen contents (instead of
CGWindowListCreateImage
) and includes some useful features like automatically handling image resizing on the gpu.Unfortunately the only way to manifest an
SCWindow
is from an instance ofSCShareableContent
, which affects all of Switch's window list and content code. Also the API isasync
which is cool but means even more rearchitecting.