.TH "screen.h" 3 "Bark" \" -*- nroff -*- .ad l .nh .SH NAME screen.h \- Bark screen-sharing session management and capture source listing\&. .SH SYNOPSIS .br .PP .SS "Classes" .in +1c .ti -1c .RI "struct \fBbark_screen_cfg\fP" .br .RI "Screen-share capture and encoding parameters\&. " .in -1c .SS "Typedefs" .in +1c .ti -1c .RI "typedef struct bark_screen \fBbark_screen_t\fP" .br .RI "Opaque screen-share controller handle\&. " .ti -1c .RI "typedef struct \fBbark_screen_cfg\fP \fBbark_screen_cfg_t\fP" .br .RI "Screen-share capture and encoding parameters\&. " .ti -1c .RI "typedef void(* \fBbark_screen_local_fn\fP) (void *user, int active, uint16_t w, uint16_t h, int rc)" .br .RI "Main-thread lifecycle callback invoked when local screen sharing starts, resizes, stops, or fails to start (\fRrc\fP != \fBBARK_OK\fP)\&. " .in -1c .SS "Functions" .in +1c .ti -1c .RI "\fBbark_screen_t\fP * \fBbark_screen_create\fP (struct bark_rtc *rtc, struct bark_view *view, int headless, \fBbark_screen_local_fn\fP on_local, void *user)" .br .RI "Create a screen-share controller wired to \fRrtc\fP and \fRview\fP\&. " .ti -1c .RI "void \fBbark_screen_destroy\fP (\fBbark_screen_t\fP *scr)" .br .RI "Stop sharing and destroy the controller\&. " .ti -1c .RI "uint32_t \fBbark_screen_caps\fP (const \fBbark_screen_t\fP *scr)" .br .RI "Query capture provider capability flags (\fBBARK_CAPTURE_FLAG_OS_PICKER\fP, \fBBARK_CAPTURE_FLAG_ENUM_SOURCES\fP)\&. " .ti -1c .RI "int \fBbark_screen_list_sources\fP (const \fBbark_screen_t\fP *scr, \fBbark_capture_source_t\fP *out, uint32_t max_count)" .br .RI "Enumerate selectable monitors and windows into \fRout\fP\&. Returns count or negative \fBbark_err_t\fP\&. " .ti -1c .RI "int \fBbark_screen_start\fP (\fBbark_screen_t\fP *scr, const \fBbark_screen_cfg_t\fP *cfg)" .br .RI "Start local screen sharing with \fRcfg\fP\&. Returns \fBBARK_OK\fP or \fBBARK_ERR_UNAVAILABLE\fP if denied\&. " .ti -1c .RI "int \fBbark_screen_update\fP (\fBbark_screen_t\fP *scr, const \fBbark_screen_cfg_t\fP *cfg)" .br .RI "Update live resolution, FPS, or bitrate of an active screen share\&. " .ti -1c .RI "void \fBbark_screen_stop\fP (\fBbark_screen_t\fP *scr)" .br .RI "Stop local screen sharing and clear the local preview source\&. " .ti -1c .RI "void \fBbark_screen_poll\fP (\fBbark_screen_t\fP *scr)" .br .RI "Pump pending local capture state transitions and frame uploads on the main thread\&. " .ti -1c .RI "int \fBbark_screen_is_active\fP (const \fBbark_screen_t\fP *scr)" .br .RI "Return non-zero if local screen sharing is currently active\&. " .ti -1c .RI "void \fBbark_screen_push_remote_rgba\fP (\fBbark_screen_t\fP *scr, const char *peer_id, const uint8_t *rgba, uint16_t w, uint16_t h)" .br .RI "Submit a decoded remote RGBA8 video frame for \fRpeer_id\fP\&. " .ti -1c .RI "void \fBbark_screen_clear_remote\fP (\fBbark_screen_t\fP *scr, const char *peer_id)" .br .RI "Clear the remote video source associated with \fRpeer_id\fP\&. " .ti -1c .RI "void \fBbark_screen_bind_slot\fP (\fBbark_screen_t\fP *scr, const char *slot_id, const char *source_key)" .br .RI "Bind a DOM \fR