I'm not aware of any clean description, but better googlers may prove me wrong.

Its all based around the way X11 did "clipboards" (without ever actually having 
such a thing):

1. user selects in app1 which tells X11 'I got a selection and can provide it 
in "foo", "bar", and "bletch" formats'
2. user pastes in app2 which asks X11 'got a selection guv?'
3. X11 replies to app2, 'sure, "foo" or "bar" or "bletch"?'
4. app2 asks X11 for '"foo" please'
5. X11 tells app1 "your finest selection in "foo" my good man, and don't spare 
the bits'[^1]
6. app1 splurts the data in "foo" format to X11 which forwards it to app2
7. app2 does paste

The data is never copied to a "clipboard".  If you look at the GTK clipboard 
API you can see how it maps to this, where "foo", "bar", and "bletch" are 
called targets and are represented as GDKAtoms (I suspect another hangover from 
X11 from the days when strings were always thought of as sloooow and sending 
and comparing integers was considered a good idea).

IIRC X11 had predefined atoms for "STRING", "PIXMAP" etc, but its always 
possible to define more, see the GDKAtom interface.

Wayland works like X11 except it recommends using Mime types for "foo" etc, but 
in the end they are all just strings that have been atomised, 
"application/scintilla.block_select" is also suitable.

How this is simulated on top of the platform clipboards for Windows and Macos I 
am not sure since I don't know how they work.

[^1]: not sure why X11 has a toffee english accent :grin:

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-osx/issues/40#issuecomment-1267687587
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany-osx/issues/40/[email protected]>

Reply via email to