summaryrefslogtreecommitdiff
path: root/core/bind
diff options
context:
space:
mode:
Diffstat (limited to 'core/bind')
-rw-r--r--core/bind/core_bind.cpp7
-rw-r--r--core/bind/core_bind.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index f6828ea76a..f5dbacd62d 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -1093,6 +1093,11 @@ void _OS::alert(const String &p_alert, const String &p_title) {
OS::get_singleton()->alert(p_alert, p_title);
}
+bool _OS::request_permission(const String &p_name) {
+
+ return OS::get_singleton()->request_permission(p_name);
+}
+
_OS *_OS::singleton = NULL;
void _OS::_bind_methods() {
@@ -1265,6 +1270,8 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_power_seconds_left"), &_OS::get_power_seconds_left);
ClassDB::bind_method(D_METHOD("get_power_percent_left"), &_OS::get_power_percent_left);
+ ClassDB::bind_method(D_METHOD("request_permission", "name"), &_OS::request_permission);
+
ADD_PROPERTY(PropertyInfo(Variant::STRING, "clipboard"), "set_clipboard", "get_clipboard");
ADD_PROPERTY(PropertyInfo(Variant::INT, "current_screen"), "set_current_screen", "get_current_screen");
ADD_PROPERTY(PropertyInfo(Variant::INT, "exit_code"), "set_exit_code", "get_exit_code");
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index f3bc4644d8..803743bc93 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -356,6 +356,8 @@ public:
bool has_feature(const String &p_feature) const;
+ bool request_permission(const String &p_name);
+
static _OS *get_singleton() { return singleton; }
_OS();