Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Mac Pasteboard & ImageTransfer

Hi SWT Folks,

I have two questions related to SWT Clipboard:

1. The Mac OS X implementation is based on deprecated Scrap Manager APIs, rather than the Pasteboard Manager APIs. The primary difference is that the Pasteboard Manager users more flexible Uniform Type Identifiers (e.g. "public.png") rather than Classic-style packed integer OSTypes (e.g. "PNGf"). There are support functions for mapping UTIs to file extensions, MIME types, OSTypes, etc. and managing hierarchical conformance relationships. These features make UTIs better suited for bundled Mac RCP applications. Is there any plan to migrate to the Pasteboard APIs?

2. There is currently no ImageDataTransfer type to handle conversion from native clipboard formats (Windows CF_DIB, Mac PICT or PDF, etc.) to ImageData. Are there any plans to add this functionality? PICT in particular is problematic, since there's no ImageFormat support available for a ByteArrayTransfer workaround. I believe it would be relatively easy to support PICT by rendering it to raster via native calls (only on the Mac, obviously) -- dodging the whole hairy file format parsing problem. Windows DIB requires only minor header rework before the BMP ImageFormat will grok. AFAIK, GTK also uses standard image formats with MIME types, so a simple ImageLoader facade should be sufficient. Would the SWT team be friendly towards a patch submission for this? Would it be likely to be targeted for 3.2 with some starter code behind it?

As always, thanks for the great work!

--
Peter Centgraf
Research Programmer,
Human-Computer Interaction Institute
Carnegie Mellon University



Back to the top