Port forwarding allows the emulator to host servers that can be
accessed from outside the virtual network.
The code for parsing the preference option "redir" is adapted from
qemu code. The rest was already implemented.
This patch introduces a few changes:
1. Data of arbitrary Mac OS types which aren't handled (i.e. non text/picture types) will now be passed through to the host pasteboard, just like in the 32-bit code.
2. Reorganization of a few things.
3. Fixed a memory leak (whoops).
I'm basically submitting this patch now because I have a few other changes I'm going to try, but since I'm not sure that they're going to work, I thought it better to flush out the changes I've already made at this point first.
Thanks,
Charles
This patch fixes one lingering problem with the 64-bit clipboard code; the way it was designed, the Mac clipboard was being cleared every time a single item was being requested by GetScrap, causing clipboards with multiple items to be unceremoniously whittled down to one. On the other hand, a similar issue was causing some items to get duplicated on the host pasteboard. This patch fixes the issue by making conversion between the host pasteboard and the Mac clipboard a singular operation; when the pasteboard data changes on the host side, it is all converted and sent to the Mac pasteboard at once, and similarly, all Mac clipboard data is sent to the host pasteboard in one operation. Also, data from the host side is copied to the Mac clipboard only if it has changed since the last check, which should improve performance as conversions will not be done over and over every time the Mac side checks whether the scrap has changed.
In addition, I've added a rudimentary PICT converter. It's rudimentary at the moment, only going in one direction, converting to PICT and not from PICT, and currently it always rasterizes the source image and creates a PICT containing bitmap data. However, it's a start, and it should solve Ronald's issue with copying images from OS X to Mac OS. In the future, more could possibly be added. I've put the new PICT code in the main source directory instead of in the MacOSX subdirectory, so that it can be used by other platforms if needed.
I would like to leave the license on the new PICT code as "Public Domain" if that is okay.
Thanks,
Charles