spout-rs 0.1.3

Rust bindings for Spout2 — GPU texture sharing on Windows
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::ffi;

/// Provides access to the system-wide registry of active Spout senders.
pub struct Directory;

impl Directory {
    /// Number of currently active senders.
    pub fn sender_count() -> i32 {
        ffi::spout_sender_count()
    }

    /// Names of all currently active senders.
    pub fn senders() -> Vec<String> {
        (0..Self::sender_count())
            .map(|i| ffi::spout_get_sender(i))
            .collect()
    }
}