diff options
| author | ConteZero <one@contezero.com> | 2021-10-12 09:43:50 +0200 |
|---|---|---|
| committer | ConteZero <one@contezero.com> | 2021-10-18 14:01:06 +0200 |
| commit | 838c9d37b4a2fbceff07e859a52838473e00850e (patch) | |
| tree | a2ae28f064ffb3722a6618b96856934dbae75078 /servers | |
| parent | 0fd50ff21777e74258ba5a38e9c32b27cf0784b2 (diff) | |
| download | redot-engine-838c9d37b4a2fbceff07e859a52838473e00850e.tar.gz | |
Added primary clipboard for Linux
Diffstat (limited to 'servers')
| -rw-r--r-- | servers/display_server.cpp | 10 | ||||
| -rw-r--r-- | servers/display_server.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/servers/display_server.cpp b/servers/display_server.cpp index 3897e5e7c2..a6101530c8 100644 --- a/servers/display_server.cpp +++ b/servers/display_server.cpp @@ -159,6 +159,14 @@ String DisplayServer::clipboard_get() const { ERR_FAIL_V_MSG(String(), "Clipboard is not supported by this display server."); } +void DisplayServer::clipboard_set_primary(const String &p_text) { + WARN_PRINT("Primary clipboard is not supported by this display server."); +} + +String DisplayServer::clipboard_get_primary() const { + ERR_FAIL_V_MSG(String(), "Primary clipboard is not supported by this display server."); +} + void DisplayServer::screen_set_orientation(ScreenOrientation p_orientation, int p_screen) { WARN_PRINT("Orientation not supported by this display server."); } @@ -360,6 +368,8 @@ void DisplayServer::_bind_methods() { ClassDB::bind_method(D_METHOD("clipboard_set", "clipboard"), &DisplayServer::clipboard_set); ClassDB::bind_method(D_METHOD("clipboard_get"), &DisplayServer::clipboard_get); + 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_screen_count"), &DisplayServer::get_screen_count); ClassDB::bind_method(D_METHOD("screen_get_position", "screen"), &DisplayServer::screen_get_position, DEFVAL(SCREEN_OF_MAIN_WINDOW)); diff --git a/servers/display_server.h b/servers/display_server.h index f411a72aa3..8af7946a1e 100644 --- a/servers/display_server.h +++ b/servers/display_server.h @@ -161,6 +161,8 @@ public: virtual void clipboard_set(const String &p_text); virtual String clipboard_get() const; + virtual void clipboard_set_primary(const String &p_text); + virtual String clipboard_get_primary() const; enum { SCREEN_OF_MAIN_WINDOW = -1 |
