diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-05-02 07:56:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-02 07:56:41 +0200 |
commit | bc7ccc909bb81334124fb24a771e148991fb0b3a (patch) | |
tree | 4c91bba239ae24a0bfebb465074085f8081b6ec2 /servers | |
parent | ce4326df76704b7abc320e09216062588f9bad0d (diff) | |
parent | 71ce5857ecb76fdca3afc1a0882a575a3879d148 (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.cpp | 2 | ||||
-rw-r--r-- | servers/display_server.h | 2 |
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 }; |