diff options
| author | Ray <[email protected]> | 2019-02-11 18:03:06 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2019-02-11 18:03:06 +0100 |
| commit | e996fe2ff511a60ac67b56996ac04a7e69fe8a69 (patch) | |
| tree | 40f9cb63ae5d1b99c4e5f213bf4c29282e6810ff /src/core.c | |
| parent | 6dbec4748858d84ecf48837270fb040c3de0aac8 (diff) | |
| download | raylib-e996fe2ff511a60ac67b56996ac04a7e69fe8a69.tar.gz raylib-e996fe2ff511a60ac67b56996ac04a7e69fe8a69.zip | |
ADDED: GetClipboardText(), SetClipboardText()
Diffstat (limited to 'src/core.c')
| -rw-r--r-- | src/core.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -984,6 +984,23 @@ const char *GetMonitorName(int monitor) return ""; } +// Get clipboard text content +// NOTE: returned string is allocated and freed by GLFW +const char *GetClipboardText(void) +{ +#if defined(PLATFORM_DESKTOP) + return glfwGetClipboardString(window); +#endif +} + +// Set clipboard text content +void SetClipboardText(const char *text) +{ +#if defined(PLATFORM_DESKTOP) + glfwSetClipboardString(window, text); +#endif +} + // Show mouse cursor void ShowCursor(void) { |
