Class MacClipboard

java.lang.Object
limn.backend.lwjgl.transfer.MacClipboard
All Implemented Interfaces:
NativeClipboard

public final class MacClipboard extends Object implements NativeClipboard
The macOS clipboard: the general NSPasteboard, on the main thread, which is the UI thread.

What this process offers is promised: a pasteboard item names its types and a data provider, an object of a class made here, which is sent pasteboard:item:provideDataForType: when a program pastes. Files are the exception, written at once as one URL an item, which is what Finder and the file panels read. What is still promised as this closes is provided then, so that a copy outlives the application, as on Windows.

An item takes only uniform type identifiers, which an application's media type with its slash is not. Such a name is written under the dynamic identifier the system derives for a pasteboard type of that name (conforming to public.data), and is still found by the name, by this toolkit and by any program that asks the pasteboard for it.

The pasteboard announces no change. Its change count is compared when the application becomes active, which is when another program's copy can first matter here, and each time the types are asked for.