Feature: Implement initial macOS SimpleRemoter client
This commit is contained in:
36
macos/Permissions.h
Normal file
36
macos/Permissions.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreGraphics/CoreGraphics.h>
|
||||
#import <ApplicationServices/ApplicationServices.h>
|
||||
|
||||
class Permissions {
|
||||
public:
|
||||
// Check if screen recording permission is granted
|
||||
// Returns true if granted, false otherwise
|
||||
static bool checkScreenCapture();
|
||||
|
||||
// Request screen recording permission (shows system dialog, macOS 10.15+)
|
||||
static void requestScreenCapture();
|
||||
|
||||
// Check if accessibility permission is granted (for input simulation)
|
||||
// Returns true if granted, false otherwise
|
||||
static bool checkAccessibility();
|
||||
|
||||
// Request accessibility permission (shows system dialog)
|
||||
static void requestAccessibility();
|
||||
|
||||
// Open System Preferences to Screen Recording settings
|
||||
static void openScreenCaptureSettings();
|
||||
|
||||
// Open System Preferences to Accessibility settings
|
||||
static void openAccessibilitySettings();
|
||||
|
||||
// Check all required permissions
|
||||
// Returns true if all permissions are granted
|
||||
static bool checkAllPermissions();
|
||||
|
||||
// Wait for permissions to be granted (blocking)
|
||||
// Returns true if all granted within timeout, false otherwise
|
||||
static bool waitForPermissions(int timeoutSeconds);
|
||||
};
|
||||
Reference in New Issue
Block a user