Commit Graph

8 Commits

Author SHA1 Message Date
James Touton
47e95ba2e6 Removed more spurious Windows.h #includes.
MSVC-compatible use of #pragma pack.
Fixed potential crash in Sys_open.
Use MSVC intrinsics for byte swapping.
Ensure use of winsock2 (instead of winsock).
Set appropriate architecture #defines.
Fixed various other compile warnings/errors.
2015-08-06 02:31:42 -07:00
CharlesJS
ed28705ee3 Patch for copying and pasting styled text in Basilisk II / SheepShaver
Added code to parse the Classic Mac OS 'styl' resources, allowing formatted text to be copied and pasted out of SheepShaver, not just plain text. In order to do this, I made some changes to the emul_op mechanism, patching ZeroScrap() in addition to the scrap methods that were already being patched. The reason for this is that since we need to read data from multiple items that are on the clipboard at once, we cannot simply assume a zero at the beginning of each PutScrap() operation.

This patch uses RTF to store styled text on the host side; unfortunately, since the APIs to convert to and from RTF data are in Cocoa but not in CoreFoundation, I had to write the new portions in Objective-C rather than C, and changed the extension from .cpp to .mm accordingly. In the future, if we are confident that this file will only be used on Mac OS X 10.6 and up, we can rewrite the Pasteboard Manager code to use NSPasteboardReading/Writing instead. This would allow us to read and write NSAttributedString objects directly to and from the pasteboard, which would make sure we were always using the OS's preferred rich text format internally instead of hard-coding it specifically to RTF as in the current implementation.

I believe that this patch should also fix the problem Ronald reported with copying accented characters.

Since I am new to 68k assembly and the emul_op mechanism, I would appreciate if someone could double-check all my changes to make sure that I have done everything correctly.

Thanks,
Charles
2012-06-30 22:20:55 -04:00
asvitkine
6db0c7453b [Patch by Kelvin Delbarre]
Fixes copy/paste errors in the Windows version of SheepShaver, wherein pasted
text would have a trailing null character or extra garbage after the end.
2009-04-14 15:17:03 +00:00
gbeauche
c8cb4879a4 Happy New Year! 2008-01-01 09:40:36 +00:00
gbeauche
dfbb829055 Use GetMainWindowHandle() provided by main_windows.cpp 2006-03-28 06:59:30 +00:00
gbeauche
29396b547b cosmetics 2006-03-27 22:04:36 +00:00
gbeauche
30632aed4f Happy New Year! 2005-01-30 21:42:16 +00:00
gbeauche
c427f0f536 Windows clipboard support (copy-paste) 2004-11-17 00:57:06 +00:00