summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-02 07:56:41 +0200
committerGitHub <noreply@github.com>2022-05-02 07:56:41 +0200
commitbc7ccc909bb81334124fb24a771e148991fb0b3a (patch)
tree4c91bba239ae24a0bfebb465074085f8081b6ec2 /servers
parentce4326df76704b7abc320e09216062588f9bad0d (diff)
parent71ce5857ecb76fdca3afc1a0882a575a3879d148 (diff)
Merge pull request #60551 from madmiraal/implement-3466
Add a method for obtaining display cutouts on Android
Diffstat (limited to 'servers')
-rw-r--r--servers/display_server.cpp2
-rw-r--r--servers/display_server.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/servers/display_server.cpp b/servers/display_server.cpp
index 8d97cd2543..e68fcc184e 100644
--- a/servers/display_server.cpp
+++ b/servers/display_server.cpp
@@ -579,6 +579,8 @@ void DisplayServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("clipboard_set_primary", "clipboard_primary"), &DisplayServer::clipboard_set_primary);
ClassDB::bind_method(D_METHOD("clipboard_get_primary"), &DisplayServer::clipboard_get_primary);
+ ClassDB::bind_method(D_METHOD("get_display_cutouts"), &DisplayServer::get_display_cutouts);
+
ClassDB::bind_method(D_METHOD("get_screen_count"), &DisplayServer::get_screen_count);
ClassDB::bind_method(D_METHOD("screen_get_position", "screen"), &DisplayServer::screen_get_position, DEFVAL(SCREEN_OF_MAIN_WINDOW));
ClassDB::bind_method(D_METHOD("screen_get_size", "screen"), &DisplayServer::screen_get_size, DEFVAL(SCREEN_OF_MAIN_WINDOW));
diff --git a/servers/display_server.h b/servers/display_server.h
index 19efcbd3dd..64340cff73 100644
--- a/servers/display_server.h
+++ b/servers/display_server.h
@@ -228,6 +228,8 @@ public:
virtual void clipboard_set_primary(const String &p_text);
virtual String clipboard_get_primary() const;
+ virtual Array get_display_cutouts() const { return Array(); }
+
enum {
SCREEN_OF_MAIN_WINDOW = -1
};