mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
[macOS] Implement optional native file selection dialog support for sandboxed apps.
This commit is contained in:
@@ -442,6 +442,10 @@ bool OS::has_feature(const String &p_feature) const {
|
||||
}
|
||||
}
|
||||
|
||||
bool OS::is_sandboxed() const {
|
||||
return ::OS::get_singleton()->is_sandboxed();
|
||||
}
|
||||
|
||||
uint64_t OS::get_static_memory_usage() const {
|
||||
return ::OS::get_singleton()->get_static_memory_usage();
|
||||
}
|
||||
@@ -545,6 +549,10 @@ Vector<String> OS::get_granted_permissions() const {
|
||||
return ::OS::get_singleton()->get_granted_permissions();
|
||||
}
|
||||
|
||||
void OS::revoke_granted_permissions() {
|
||||
::OS::get_singleton()->revoke_granted_permissions();
|
||||
}
|
||||
|
||||
String OS::get_unique_id() const {
|
||||
return ::OS::get_singleton()->get_unique_id();
|
||||
}
|
||||
@@ -636,10 +644,12 @@ void OS::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_main_thread_id"), &OS::get_main_thread_id);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("has_feature", "tag_name"), &OS::has_feature);
|
||||
ClassDB::bind_method(D_METHOD("is_sandboxed"), &OS::is_sandboxed);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("request_permission", "name"), &OS::request_permission);
|
||||
ClassDB::bind_method(D_METHOD("request_permissions"), &OS::request_permissions);
|
||||
ClassDB::bind_method(D_METHOD("get_granted_permissions"), &OS::get_granted_permissions);
|
||||
ClassDB::bind_method(D_METHOD("revoke_granted_permissions"), &OS::revoke_granted_permissions);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "low_processor_usage_mode"), "set_low_processor_usage_mode", "is_in_low_processor_usage_mode");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "low_processor_usage_mode_sleep_usec"), "set_low_processor_usage_mode_sleep_usec", "get_low_processor_usage_mode_sleep_usec");
|
||||
|
||||
Reference in New Issue
Block a user