Commit 78efa56d authored by Sam Lantinga's avatar Sam Lantinga

Updated Xcode project files for clipboard API

Fixed generation of SDL_revision.h when hg is in the path set up in .bash_profile
parent 3ff2d236
...@@ -67,6 +67,9 @@ ...@@ -67,6 +67,9 @@
043DD77110FD8A0000DED673 /* SDL_blendfillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 043DD76D10FD8A0000DED673 /* SDL_blendfillrect.c */; }; 043DD77110FD8A0000DED673 /* SDL_blendfillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 043DD76D10FD8A0000DED673 /* SDL_blendfillrect.c */; };
043DD77210FD8A0000DED673 /* SDL_drawrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 043DD76E10FD8A0000DED673 /* SDL_drawrect.c */; }; 043DD77210FD8A0000DED673 /* SDL_drawrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 043DD76E10FD8A0000DED673 /* SDL_drawrect.c */; };
04461DEE0EA76BA3006C462D /* SDL_haptic.h in Headers */ = {isa = PBXBuildFile; fileRef = 04461DED0EA76BA3006C462D /* SDL_haptic.h */; settings = {ATTRIBUTES = (Public, ); }; }; 04461DEE0EA76BA3006C462D /* SDL_haptic.h in Headers */ = {isa = PBXBuildFile; fileRef = 04461DED0EA76BA3006C462D /* SDL_haptic.h */; settings = {ATTRIBUTES = (Public, ); }; };
044E5FB511E6069F0076F181 /* SDL_clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 044E5FB311E6069F0076F181 /* SDL_clipboard.h */; };
044E5FB611E6069F0076F181 /* SDL_input.h in Headers */ = {isa = PBXBuildFile; fileRef = 044E5FB411E6069F0076F181 /* SDL_input.h */; };
044E5FB811E606EB0076F181 /* SDL_clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 044E5FB711E606EB0076F181 /* SDL_clipboard.c */; };
0463873F0F0B5B7D0041FD65 /* SDL_blendline.c in Sources */ = {isa = PBXBuildFile; fileRef = 046387370F0B5B7D0041FD65 /* SDL_blendline.c */; }; 0463873F0F0B5B7D0041FD65 /* SDL_blendline.c in Sources */ = {isa = PBXBuildFile; fileRef = 046387370F0B5B7D0041FD65 /* SDL_blendline.c */; };
046387400F0B5B7D0041FD65 /* SDL_blendpoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 046387380F0B5B7D0041FD65 /* SDL_blendpoint.c */; }; 046387400F0B5B7D0041FD65 /* SDL_blendpoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 046387380F0B5B7D0041FD65 /* SDL_blendpoint.c */; };
046387410F0B5B7D0041FD65 /* SDL_blendrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 046387390F0B5B7D0041FD65 /* SDL_blendrect.c */; }; 046387410F0B5B7D0041FD65 /* SDL_blendrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 046387390F0B5B7D0041FD65 /* SDL_blendrect.c */; };
...@@ -313,6 +316,9 @@ ...@@ -313,6 +316,9 @@
043DD76D10FD8A0000DED673 /* SDL_blendfillrect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blendfillrect.c; sourceTree = "<group>"; }; 043DD76D10FD8A0000DED673 /* SDL_blendfillrect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blendfillrect.c; sourceTree = "<group>"; };
043DD76E10FD8A0000DED673 /* SDL_drawrect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_drawrect.c; sourceTree = "<group>"; }; 043DD76E10FD8A0000DED673 /* SDL_drawrect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_drawrect.c; sourceTree = "<group>"; };
04461DED0EA76BA3006C462D /* SDL_haptic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_haptic.h; path = ../../include/SDL_haptic.h; sourceTree = SOURCE_ROOT; }; 04461DED0EA76BA3006C462D /* SDL_haptic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_haptic.h; path = ../../include/SDL_haptic.h; sourceTree = SOURCE_ROOT; };
044E5FB311E6069F0076F181 /* SDL_clipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_clipboard.h; path = ../../include/SDL_clipboard.h; sourceTree = SOURCE_ROOT; };
044E5FB411E6069F0076F181 /* SDL_input.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_input.h; path = ../../include/SDL_input.h; sourceTree = SOURCE_ROOT; };
044E5FB711E606EB0076F181 /* SDL_clipboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_clipboard.c; sourceTree = "<group>"; };
046387370F0B5B7D0041FD65 /* SDL_blendline.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blendline.c; sourceTree = "<group>"; }; 046387370F0B5B7D0041FD65 /* SDL_blendline.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blendline.c; sourceTree = "<group>"; };
046387380F0B5B7D0041FD65 /* SDL_blendpoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blendpoint.c; sourceTree = "<group>"; }; 046387380F0B5B7D0041FD65 /* SDL_blendpoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blendpoint.c; sourceTree = "<group>"; };
046387390F0B5B7D0041FD65 /* SDL_blendrect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blendrect.c; sourceTree = "<group>"; }; 046387390F0B5B7D0041FD65 /* SDL_blendrect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blendrect.c; sourceTree = "<group>"; };
...@@ -826,19 +832,23 @@ ...@@ -826,19 +832,23 @@
FD99B8BC0DD52E5C00FB1D6B /* Public Headers */ = { FD99B8BC0DD52E5C00FB1D6B /* Public Headers */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
04F2AF531104ABC300D6DDF7 /* SDL_assert.h */,
04B2ECE61025CE4800F9BC5F /* SDL_atomic.h */,
FD99B8CC0DD52EB400FB1D6B /* begin_code.h */, FD99B8CC0DD52EB400FB1D6B /* begin_code.h */,
FD99B8CD0DD52EB400FB1D6B /* close_code.h */, FD99B8CD0DD52EB400FB1D6B /* close_code.h */,
FD99B8F50DD52EB400FB1D6B /* SDL.h */,
04F2AF531104ABC300D6DDF7 /* SDL_assert.h */,
04B2ECE61025CE4800F9BC5F /* SDL_atomic.h */,
FD99B8CF0DD52EB400FB1D6B /* SDL_audio.h */, FD99B8CF0DD52EB400FB1D6B /* SDL_audio.h */,
044E5FB311E6069F0076F181 /* SDL_clipboard.h */,
FD99B8D10DD52EB400FB1D6B /* SDL_compat.h */, FD99B8D10DD52EB400FB1D6B /* SDL_compat.h */,
04EC8B501025D12900431D42 /* SDL_config_iphoneos.h */,
04B2ED061025CF9E00F9BC5F /* SDL_config.h */, 04B2ED061025CF9E00F9BC5F /* SDL_config.h */,
04EC8B501025D12900431D42 /* SDL_config_iphoneos.h */,
FD99B8DA0DD52EB400FB1D6B /* SDL_copying.h */, FD99B8DA0DD52EB400FB1D6B /* SDL_copying.h */,
FD99B8DB0DD52EB400FB1D6B /* SDL_cpuinfo.h */, FD99B8DB0DD52EB400FB1D6B /* SDL_cpuinfo.h */,
FD99B8F60DD52EB400FB1D6B /* SDL_endian.h */,
FD99B8DC0DD52EB400FB1D6B /* SDL_error.h */, FD99B8DC0DD52EB400FB1D6B /* SDL_error.h */,
FD99B8DD0DD52EB400FB1D6B /* SDL_events.h */, FD99B8DD0DD52EB400FB1D6B /* SDL_events.h */,
04461DED0EA76BA3006C462D /* SDL_haptic.h */, 04461DED0EA76BA3006C462D /* SDL_haptic.h */,
044E5FB411E6069F0076F181 /* SDL_input.h */,
FD99B8DE0DD52EB400FB1D6B /* SDL_joystick.h */, FD99B8DE0DD52EB400FB1D6B /* SDL_joystick.h */,
FD99B8DF0DD52EB400FB1D6B /* SDL_keyboard.h */, FD99B8DF0DD52EB400FB1D6B /* SDL_keyboard.h */,
FD99B8E00DD52EB400FB1D6B /* SDL_keysym.h */, FD99B8E00DD52EB400FB1D6B /* SDL_keysym.h */,
...@@ -865,8 +875,6 @@ ...@@ -865,8 +875,6 @@
FD99B8F20DD52EB400FB1D6B /* SDL_types.h */, FD99B8F20DD52EB400FB1D6B /* SDL_types.h */,
FD99B8F30DD52EB400FB1D6B /* SDL_version.h */, FD99B8F30DD52EB400FB1D6B /* SDL_version.h */,
FD99B8F40DD52EB400FB1D6B /* SDL_video.h */, FD99B8F40DD52EB400FB1D6B /* SDL_video.h */,
FD99B8F50DD52EB400FB1D6B /* SDL.h */,
FD99B8F60DD52EB400FB1D6B /* SDL_endian.h */,
); );
name = "Public Headers"; name = "Public Headers";
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1023,6 +1031,7 @@ ...@@ -1023,6 +1031,7 @@
FDA682420DF2374D00F98A1A /* video */ = { FDA682420DF2374D00F98A1A /* video */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
044E5FB711E606EB0076F181 /* SDL_clipboard.c */,
FD689F090E26E5D900F90B21 /* uikit */, FD689F090E26E5D900F90B21 /* uikit */,
FDA685F40DF244C800F98A1A /* dummy */, FDA685F40DF244C800F98A1A /* dummy */,
0495E6850E97408800152DFE /* SDL_glfuncs.h */, 0495E6850E97408800152DFE /* SDL_glfuncs.h */,
...@@ -1173,6 +1182,8 @@ ...@@ -1173,6 +1182,8 @@
043DD77010FD8A0000DED673 /* SDL_alphamult.h in Headers */, 043DD77010FD8A0000DED673 /* SDL_alphamult.h in Headers */,
04F2AF541104ABC300D6DDF7 /* SDL_assert.h in Headers */, 04F2AF541104ABC300D6DDF7 /* SDL_assert.h in Headers */,
006E9888119552DD001DE610 /* SDL_rwopsbundlesupport.h in Headers */, 006E9888119552DD001DE610 /* SDL_rwopsbundlesupport.h in Headers */,
044E5FB511E6069F0076F181 /* SDL_clipboard.h in Headers */,
044E5FB611E6069F0076F181 /* SDL_input.h in Headers */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -1411,6 +1422,7 @@ ...@@ -1411,6 +1422,7 @@
56ED04E1118A8EE200A56AA6 /* SDL_power.c in Sources */, 56ED04E1118A8EE200A56AA6 /* SDL_power.c in Sources */,
56ED04E3118A8EFD00A56AA6 /* SDL_syspower.m in Sources */, 56ED04E3118A8EFD00A56AA6 /* SDL_syspower.m in Sources */,
006E9889119552DD001DE610 /* SDL_rwopsbundlesupport.m in Sources */, 006E9889119552DD001DE610 /* SDL_rwopsbundlesupport.m in Sources */,
044E5FB811E606EB0076F181 /* SDL_clipboard.c in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
......
This diff is collapsed.
...@@ -23,20 +23,28 @@ ...@@ -23,20 +23,28 @@
#include "SDL_cocoavideo.h" #include "SDL_cocoavideo.h"
static NSString *
int GetTextFormat(_THIS)
Cocoa_SetClipboardText(_THIS, const char *text)
{ {
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
return NSStringPboardType;
#else
SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
NSAutoreleasePool *pool;
NSPasteboard *pasteboard;
NSString *format;
if (data->osversion >= 0x1060) { if (data->osversion >= 0x1060) {
format = NSPasteboardTypeString; return NSPasteboardTypeString;
} else { } else {
format = NSStringPboardType; return NSStringPboardType;
} }
#endif
}
int
Cocoa_SetClipboardText(_THIS, const char *text)
{
NSAutoreleasePool *pool;
NSPasteboard *pasteboard;
NSString *format = GetTextFormat(_this);
pool = [[NSAutoreleasePool alloc] init]; pool = [[NSAutoreleasePool alloc] init];
...@@ -52,19 +60,12 @@ Cocoa_SetClipboardText(_THIS, const char *text) ...@@ -52,19 +60,12 @@ Cocoa_SetClipboardText(_THIS, const char *text)
char * char *
Cocoa_GetClipboardText(_THIS) Cocoa_GetClipboardText(_THIS)
{ {
SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
NSAutoreleasePool *pool; NSAutoreleasePool *pool;
NSPasteboard *pasteboard; NSPasteboard *pasteboard;
NSString *format; NSString *format = GetTextFormat(_this);
NSString *available; NSString *available;
char *text; char *text;
if (data->osversion >= 0x1060) {
format = NSPasteboardTypeString;
} else {
format = NSStringPboardType;
}
pool = [[NSAutoreleasePool alloc] init]; pool = [[NSAutoreleasePool alloc] init];
pasteboard = [NSPasteboard generalPasteboard]; pasteboard = [NSPasteboard generalPasteboard];
...@@ -92,19 +93,12 @@ Cocoa_GetClipboardText(_THIS) ...@@ -92,19 +93,12 @@ Cocoa_GetClipboardText(_THIS)
SDL_bool SDL_bool
Cocoa_HasClipboardText(_THIS) Cocoa_HasClipboardText(_THIS)
{ {
SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
NSAutoreleasePool *pool; NSAutoreleasePool *pool;
NSPasteboard *pasteboard; NSPasteboard *pasteboard;
NSString *format; NSString *format = GetTextFormat(_this);
NSString *available; NSString *available;
SDL_bool result; SDL_bool result;
if (data->osversion >= 0x1060) {
format = NSPasteboardTypeString;
} else {
format = NSStringPboardType;
}
pool = [[NSAutoreleasePool alloc] init]; pool = [[NSAutoreleasePool alloc] init];
pasteboard = [NSPasteboard generalPasteboard]; pasteboard = [NSPasteboard generalPasteboard];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment