// mcap's ScreenCaptureKit shim (capture.m): plain C, for Jai (src/app/screen_capture_macos.jai). #pragma once #include // One screen to copy. display_id, width and height (its size in pixels) are given; ScreenCaptureKit's // own width and height and the pixels (packed RGBA, opaque, sRGB; free with mcap_sck_free) come back. typedef struct { uint32_t display_id; int32_t width, height; uint8_t *pixels; } Mcap_Sck_Shot; // Copies each screen, all at once, and waits for them. 1 when every one was copied; else 0, with why // in error (pixels already made are left set, to be freed). int mcap_sck_screenshots(Mcap_Sck_Shot *shots, int count, char *error, int error_size); void mcap_sck_free(void *pointer);