Bug 1858509 add thread-safety annotations around MediaSourceDemuxer::mMonitor r=alwu
[gecko.git] / third_party / rust / core-graphics / src / access.rs
blob4e852c85ae842d8165f0fa05fafbabcbf3d2c670
1 pub use base::boolean_t;
3 #[derive(Default)]
4 pub struct ScreenCaptureAccess;
6 impl ScreenCaptureAccess {
7     /// If current app not in list, will open window.
8     /// Return the same result as preflight.
9     #[inline]
10     pub fn request(&self) -> bool {
11         unsafe { CGRequestScreenCaptureAccess() == 1 }
12     }
14     /// Return true if has access
15     #[inline]
16     pub fn preflight(&self) -> bool {
17         unsafe { CGPreflightScreenCaptureAccess() == 1 }
18     }
21 #[link(name = "CoreGraphics", kind = "framework")]
22 extern "C" {
23     // Screen Capture Access
24     fn CGRequestScreenCaptureAccess() -> boolean_t;
25     fn CGPreflightScreenCaptureAccess() -> boolean_t;