[links] Drag 'n drop support!
Edward Rosten
edrosten at lanl.gov
Wed Apr 18 13:12:36 MDT 2007
Links now supports Drag 'n drop. The patch is attached as a gzipped patch,
since raw patches trigger spamassin's filters.
The X11 backend is fully implemented.
The links front end is a bit lacking (matching my knowledge of links
internals).
Links accepts 3 kind of data, URLs, text and data:
URLs can have a name which is different from the href (ie bookmarks)
Data can be text/html, image/jpeg or image/png. Data is saved to a temp file
and referred to by the URL of a temp file.
Text is any of the plain text types.
You can drag URLs or data (eg a text selection from OpenOffice) on to the main
Links window. With OpenOffice text, you see it rendered with the styles
selected in OpenOffice (up to the capability of Links).
You can't drag text in to text input boxes, or URLs on to the bookmark or
blocklist manager, because haven't figured out how to do that.
On the back end, here's how it works. There are two new button press types:
B_DND_REQUEST
B_DND_DROP
When dragging, the B_DND_REQUEST events get generated. To respond to one of
these, do dnd_list_types(), to get the available types (any mix of DND_URL,
DND_DATA and DND_TEXT), and choose the most suitable and select it with
dnd_select_type().
When a drop has succesfully occured (and the data has arrived), a B_DND_DROP
event is generated. The dnd data can be accessed with dnd_get_result().
Look in view.c for the preliminary integration with links.
I haven't integrated it with the paste system yet. The mechanism for X11
copy/paste and DnD are almost identical, so links could get advanced pasting
quite easily as well.
-Ed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: links-2.1pre28-dnd.patch.gz
Type: application/x-gzip
Size: 6820 bytes
Desc:
Url : http://linuxfromscratch.org/pipermail/links-list/attachments/20070418/a7de70f1/attachment.bin
More information about the links-list
mailing list