21 #include "../../SDL_internal.h" 23 #if SDL_VIDEO_DRIVER_COCOA 26 #include "../../events/SDL_clipboardevents_c.h" 31 if (
floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5) {
32 return NSPasteboardTypeString;
34 return NSStringPboardType;
43 NSPasteboard *pasteboard;
46 pasteboard = [NSPasteboard generalPasteboard];
47 data->
clipboard_count = [pasteboard declareTypes:[NSArray arrayWithObject:format] owner:nil];
48 [pasteboard setString:[NSString stringWithUTF8String:text] forType:format];
57 NSPasteboard *pasteboard;
62 pasteboard = [NSPasteboard generalPasteboard];
63 available = [pasteboard availableTypeFromArray: [NSArray arrayWithObject:format]];
64 if ([available isEqualToString:format]) {
68 string = [pasteboard stringForType:format];
72 utf8 = [string UTF8String];
98 NSPasteboard *pasteboard;
101 pasteboard = [NSPasteboard generalPasteboard];
102 count = [pasteboard changeCount];
NSInteger clipboard_count
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
char * Cocoa_GetClipboardText(_THIS)
GLsizei const GLchar *const * string
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
static SDL_VideoDevice * _this
int Cocoa_SetClipboardText(_THIS, const char *text)
SDL_bool Cocoa_HasClipboardText(_THIS)
int SDL_SendClipboardUpdate(void)
void Cocoa_CheckClipboardUpdate(struct SDL_VideoData *data)
static char text[MAX_TEXT_LENGTH]