x-win 5.7.0

This package allows you to retrieve precise information about active and open windows on Windows, MacOS, and Linux. You can obtain the position, size, title, and other memory of windows.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![deny(unused_imports)]
#![allow(dead_code)]

use objc2_core_graphics::{CGPreflightScreenCaptureAccess, CGRequestScreenCaptureAccess};

/// Return `true` or `false` about screen record permission
/// <div class="warning">important Work only with macOS 10.15+</div>
/// To use this function you need to add `macos_permission` feature
pub fn check_screen_record_permission() -> bool {
  CGPreflightScreenCaptureAccess()
}

/// Ask for screen record permission and return `true` or `false` after confirmation
/// <div class="warning">important Work only with macOS 10.15+</div>
pub fn request_screen_record_permission() -> bool {
  CGRequestScreenCaptureAccess()
}