Clipboard types other than text on Windows #29
Labels
No labels
needs-info
needs-triage
ready-for-agent
ready-for-human
wayfinder:map
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jeff/harrier#29
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On Windows, harrier's clipboard is text only:
CF_UNICODETEXTin both directions. #23 brings any Clipboard type to Wayland, and leaves Windows for here.Windows has clipboard formats, not MIME types, so this needs a mapping in both directions. Decisions to make:
PNG(registered) ↔image/png;HTML Format, which wraps the HTML in its own header with byte offsets, ↔text/html;CF_DIB/CF_DIBV5↔ an image. Most screenshot tools put only a DIB on the clipboard, so whether harrier converts DIB to PNG decides whether reading an image works at all.The drag and drop code's
IDataObjecthelpers (hasFormat,dataOf,formatOf) are a starting point.Implemented in
b88d6fd; left open until it's been tried on Windows: copying an image and HTML both into and out of harrier, and pasting a screenshot (a bare DIB) into a kitty-protocol program.Tried on Windows: a PNG put on the clipboard pastes. Carried by
b88d6fd.