diff options
author | marha <marha@users.sourceforge.net> | 2009-10-05 15:13:41 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-10-05 15:13:41 +0000 |
commit | 78db264e7992131e0781bdfa5ede821305262b2d (patch) | |
tree | 7461ae9dab5bf69f056250fc233c1ada393dc957 /xorg-server/hw/xquartz/quartzCocoa.m | |
parent | 1d2fa791e7eb383cf2818bb2e33da546edbeade9 (diff) | |
parent | 77a4732b0637493966889fe3545966fdc12a1b5e (diff) | |
download | vcxsrv-78db264e7992131e0781bdfa5ede821305262b2d.tar.gz vcxsrv-78db264e7992131e0781bdfa5ede821305262b2d.tar.bz2 vcxsrv-78db264e7992131e0781bdfa5ede821305262b2d.zip |
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/hw/xquartz/quartzCocoa.m')
-rw-r--r-- | xorg-server/hw/xquartz/quartzCocoa.m | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/xorg-server/hw/xquartz/quartzCocoa.m b/xorg-server/hw/xquartz/quartzCocoa.m index 0ab94936c..450147207 100644 --- a/xorg-server/hw/xquartz/quartzCocoa.m +++ b/xorg-server/hw/xquartz/quartzCocoa.m @@ -40,67 +40,10 @@ #include "quartzCommon.h" #include "inputstr.h" -#include "quartzPasteboard.h" #include "darwin.h" /* - * QuartzWriteCocoaPasteboard - * Write text to the Mac OS X pasteboard. - */ -void QuartzWriteCocoaPasteboard( - char *text) -{ - NSPasteboard *pasteboard; - NSArray *pasteboardTypes; - NSString *string; - - if (! text) return; - pasteboard = [NSPasteboard generalPasteboard]; - if (! pasteboard) return; - string = [NSString stringWithCString:text]; - if (! string) return; - pasteboardTypes = [NSArray arrayWithObject:NSStringPboardType]; - - // nil owner because we don't provide type translations - [pasteboard declareTypes:pasteboardTypes owner:nil]; - [pasteboard setString:string forType:NSStringPboardType]; -} - - -/* - * QuartzReadCocoaPasteboard - * Read text from the Mac OS X pasteboard and return it as a heap string. - * The caller must free the string. - */ -char *QuartzReadCocoaPasteboard(void) -{ - NSPasteboard *pasteboard; - NSArray *pasteboardTypes; - NSString *existingType; - char *text = NULL; - - pasteboardTypes = [NSArray arrayWithObject:NSStringPboardType]; - pasteboard = [NSPasteboard generalPasteboard]; - if (! pasteboard) return NULL; - - existingType = [pasteboard availableTypeFromArray:pasteboardTypes]; - if (existingType) { - NSString *string = [pasteboard stringForType:existingType]; - char *buffer; - - if (! string) return NULL; - buffer = (char *) [string UTF8String]; - text = (char *) malloc(strlen(buffer)+1); - if (text) - strcpy(text, buffer); - } - - return text; -} - - -/* * QuartzFSUseQDCursor * Return whether the screen should use a QuickDraw cursor. */ |