We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS taken from Sokol:
_SOKOL_PRIVATE void _sapp_macos_set_clipboard_string(const char* str) { @autoreleasepool { NSPasteboard* pasteboard = [NSPasteboard generalPasteboard]; [pasteboard declareTypes:@[NSPasteboardTypeString] owner:nil]; [pasteboard setString:@(str) forType:NSPasteboardTypeString]; } } _SOKOL_PRIVATE const char* _sapp_macos_get_clipboard_string(void) { SOKOL_ASSERT(_sapp.clipboard.buffer); @autoreleasepool { _sapp.clipboard.buffer[0] = 0; NSPasteboard* pasteboard = [NSPasteboard generalPasteboard]; if (![[pasteboard types] containsObject:NSPasteboardTypeString]) { return _sapp.clipboard.buffer; } NSString* str = [pasteboard stringForType:NSPasteboardTypeString]; if (!str) { return _sapp.clipboard.buffer; } _sapp_strcpy([str UTF8String], _sapp.clipboard.buffer, _sapp.clipboard.buf_size); } return _sapp.clipboard.buffer; }
The text was updated successfully, but these errors were encountered:
LIL-82 Re-implement cross platform copy and paste
Sorry, something went wrong.
tauraamui
No branches or pull requests
macOS taken from Sokol:
The text was updated successfully, but these errors were encountered: