implement primary selection api on cocoa as stubs, can be useful for #5357
This commit is contained in:
parent
a487a78200
commit
d04d4444af
@ -2479,6 +2479,13 @@ void _glfwPlatformSetClipboardString(const char* string)
|
||||
[pasteboard setString:@(string) forType:NSPasteboardTypeString];
|
||||
}
|
||||
|
||||
void _glfwPlatformSetPrimarySelectionString(const char* string) {
|
||||
(void)string;
|
||||
// Apple doesnt have a primary selection
|
||||
}
|
||||
|
||||
const char* _glfwPlatformGetPrimarySelectionString(void) { return ""; }
|
||||
|
||||
const char* _glfwPlatformGetClipboardString(void)
|
||||
{
|
||||
NSPasteboard* pasteboard = [NSPasteboard generalPasteboard];
|
||||
|
||||
2
glfw/input.c
vendored
2
glfw/input.c
vendored
@ -1540,7 +1540,7 @@ GLFWAPI const char* glfwGetClipboardString(GLFWwindow* handle UNUSED)
|
||||
return _glfwPlatformGetClipboardString();
|
||||
}
|
||||
|
||||
#if defined(_GLFW_X11) || defined(_GLFW_WAYLAND)
|
||||
#if defined(_GLFW_X11) || defined(_GLFW_WAYLAND) || defined(__APPLE__)
|
||||
GLFWAPI void glfwSetPrimarySelectionString(GLFWwindow* handle UNUSED, const char* string)
|
||||
{
|
||||
assert(string != NULL);
|
||||
|
||||
2
glfw/internal.h
vendored
2
glfw/internal.h
vendored
@ -675,7 +675,7 @@ void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)
|
||||
|
||||
void _glfwPlatformSetClipboardString(const char* string);
|
||||
const char* _glfwPlatformGetClipboardString(void);
|
||||
#if defined(_GLFW_X11) || defined(_GLFW_WAYLAND)
|
||||
#if defined(_GLFW_X11) || defined(_GLFW_WAYLAND) || defined(__APPLE__)
|
||||
void _glfwPlatformSetPrimarySelectionString(const char* string);
|
||||
const char* _glfwPlatformGetPrimarySelectionString(void);
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user