comparison src/video/cocoa/SDL_cocoaclipboard.m @ 4504:9faebccfefb3

Amazingly the Windows code is almost identical to the Mac OS X code. :)
author Sam Lantinga <slouken@libsdl.org>
date Thu, 08 Jul 2010 23:07:34 -0700
parents 524dfefd554c
children 514f811a4887
comparison
equal deleted inserted replaced
4503:524dfefd554c 4504:9faebccfefb3
43 int 43 int
44 Cocoa_SetClipboardText(_THIS, const char *text) 44 Cocoa_SetClipboardText(_THIS, const char *text)
45 { 45 {
46 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; 46 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
47 NSAutoreleasePool *pool; 47 NSAutoreleasePool *pool;
48 NSPasteboard *pasteboard; 48 NSPasteboard *pasteboard;
49 NSString *format = GetTextFormat(_this); 49 NSString *format = GetTextFormat(_this);
50 50
51 pool = [[NSAutoreleasePool alloc] init]; 51 pool = [[NSAutoreleasePool alloc] init];
52 52
53 pasteboard = [NSPasteboard generalPasteboard]; 53 pasteboard = [NSPasteboard generalPasteboard];
61 61
62 char * 62 char *
63 Cocoa_GetClipboardText(_THIS) 63 Cocoa_GetClipboardText(_THIS)
64 { 64 {
65 NSAutoreleasePool *pool; 65 NSAutoreleasePool *pool;
66 NSPasteboard *pasteboard; 66 NSPasteboard *pasteboard;
67 NSString *format = GetTextFormat(_this); 67 NSString *format = GetTextFormat(_this);
68 NSString *available; 68 NSString *available;
69 char *text; 69 char *text;
70 70
71 pool = [[NSAutoreleasePool alloc] init]; 71 pool = [[NSAutoreleasePool alloc] init];
94 94
95 SDL_bool 95 SDL_bool
96 Cocoa_HasClipboardText(_THIS) 96 Cocoa_HasClipboardText(_THIS)
97 { 97 {
98 NSAutoreleasePool *pool; 98 NSAutoreleasePool *pool;
99 NSPasteboard *pasteboard; 99 NSPasteboard *pasteboard;
100 NSString *format = GetTextFormat(_this); 100 NSString *format = GetTextFormat(_this);
101 NSString *available; 101 NSString *available;
102 SDL_bool result; 102 SDL_bool result;
103 103
104 pool = [[NSAutoreleasePool alloc] init]; 104 pool = [[NSAutoreleasePool alloc] init];
118 118
119 void 119 void
120 Cocoa_CheckClipboardUpdate(struct SDL_VideoData * data) 120 Cocoa_CheckClipboardUpdate(struct SDL_VideoData * data)
121 { 121 {
122 NSAutoreleasePool *pool; 122 NSAutoreleasePool *pool;
123 NSPasteboard *pasteboard; 123 NSPasteboard *pasteboard;
124 NSInteger count; 124 NSInteger count;
125 125
126 pool = [[NSAutoreleasePool alloc] init]; 126 pool = [[NSAutoreleasePool alloc] init];
127 127
128 pasteboard = [NSPasteboard generalPasteboard]; 128 pasteboard = [NSPasteboard generalPasteboard];