You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to screen capture in macos, I get a pop-up if I don't have permission. I want to replace this pop-up with my custom pop-up. Is there a way to look up the system's settings before this pop-up pops up?
I already know that I can access tcc.db to verify permissions, but I couldn't access this db in my application.
The text was updated successfully, but these errors were encountered:
// screen_capture.rs// Use the objc crate to work with Objective-C objects and runtimeexterncrate objc;// Import necessary parts from the objc crateuse objc::runtime::Object;use std::os::raw::c_void;// Declare the external functions from CoreGraphics frameworkextern"C"{// CGPreflightScreenCaptureAccess doesn't take parameters and returns a bool.// True if the app either already has screen capture access or if the system// version is earlier than 10.15. False otherwise.fnCGPreflightScreenCaptureAccess() -> bool;// CGRequestScreenCaptureAccess doesn't take parameters and returns a bool.// True if the user grants permission or if the app already has permission.// False if the user denies permission or if an error occurs.fnCGRequestScreenCaptureAccess() -> bool;}/// Check if the user has already granted screen capture access or if the system/// version is earlier than 10.15.pubfnpreflight_access() -> bool{unsafe{// Safety: Calling an external C function, considered unsafe in RustCGPreflightScreenCaptureAccess()}}/// Request screen capture access from the user.pubfnrequest_access() -> bool{unsafe{// Safety: Calling an external C function, considered unsafe in RustCGRequestScreenCaptureAccess()}}
When I try to screen capture in macos, I get a pop-up if I don't have permission. I want to replace this pop-up with my custom pop-up. Is there a way to look up the system's settings before this pop-up pops up?
I already know that I can access tcc.db to verify permissions, but I couldn't access this db in my application.
The text was updated successfully, but these errors were encountered: