[Vm-dev] Extended Clipboard

David T. Lewis lewis at mail.msen.com
Sat Mar 25 15:40:40 UTC 2023


On Fri, Mar 24, 2023 at 05:42:34PM -0700, Eliot Miranda wrote:
>  
> Hi Dave, can you email me the file or commit it to the opensmalltalk repo?
> If you do the latter don't worry; nothing will break because it isn't
> included in any plugins.int/.ext yet
> 

I committed the original OLPC source, then updated the include order
so it builds cleanly. There are undefined symbol errors when the plugin
is loaded (no surprise) but this should be a good starting point.

Dave


Just for the record, here is the original change history from the OLPC project:

------------------------------------------------------------------------
r1800 | takashi | 2007-12-09 19:36:52 -0500 (Sun, 09 Dec 2007) | 10 lines

Asynchronous drag drop out. Serializing happens only after the
destination app requests (which means it works fine with Sugar
frame). 

The request is noticed with sqDragDropFilesEvent(DragRequest).  I
decided not to reuse clipboard mechanism to pass the data from image
to vm because clipboard and dnd are so different.

(svn merge -r 1789:1799 http://squeakvm.org/svn/squeak/branches/takashi-branch)

------------------------------------------------------------------------
r1740 | takashi | 2007-07-12 01:03:17 -0400 (Thu, 12 Jul 2007) | 4 lines

- Show the cursor forced when you drag out.
- Fixed a too stupid bug about type index for clipboard.
(svn merge -r 1736:1739 http://squeakvm.org/svn/squeak/branches/takashi-branch)

------------------------------------------------------------------------
r1725 | takashi | 2007-06-25 22:57:01 -0400 (Mon, 25 Jun 2007) | 8 lines

Merged from Drag and Drop output.

- Event handler for DnD was restructured.
- Unnecessary public functions I made were set to static.
- Layout of OggPlugin and ClipboardExtendedPlugin was proper place.

(svn merge -r 1685:HEAD http://squeakvm.org/svn/squeak/branches/takashi-branch)

------------------------------------------------------------------------
r1683 | takashi | 2007-05-15 12:20:53 -0400 (Tue, 15 May 2007) | 21 lines

Merged a part of ClipboardExtendedPlugin for X11

- This patch allows you to paste data with any types from another
  application. I have tested with Firefox, gimp, gedit and Abiword (It
  is not implemented yet to copy FROM squeak to others).

- Also, drag and drop is improved to handle any types besides text/url-list.

- sqUnixExtendedClipboard.c is just a interface. The body of the code
  is implemented in sqUnixX11.c.

- When you drop non text/url-list file, DropFilesEvent with zero file
  count is generated. The the image retrieve the data from clipboard
  by the event. For the image, dropped contents and pasted contents
  are seen as same. Dropped contents is removed after it is retrieved
  once (it is necessary because Squeak has to send finish event to the
  peer), but pasted contents is kept until when selection owner is
  changed.

(svn merge -r 1672:1682 http://squeakvm.org/svn/squeak/branches/takashi-branch)

------------------------------------------------------------------------
r1682 | takashi | 2007-05-15 09:15:26 -0400 (Tue, 15 May 2007) | 1 line

tiny comment
------------------------------------------------------------------------
r1681 | takashi | 2007-05-15 05:52:36 -0400 (Tue, 15 May 2007) | 1 line

further memory reduce for DnD
------------------------------------------------------------------------
r1680 | takashi | 2007-05-15 05:06:02 -0400 (Tue, 15 May 2007) | 1 line

Target window for DnD is always stParent
------------------------------------------------------------------------
r1677 | takashi | 2007-05-13 23:09:58 -0400 (Sun, 13 May 2007) | 1 line

INCR protocol and partial property reading was suppored in clipboard (but a bug remains).
------------------------------------------------------------------------
r1674 | takashi | 2007-05-12 09:07:10 -0400 (Sat, 12 May 2007) | 1 line

Just simple fixes to pass -Wall
------------------------------------------------------------------------
r1673 | takashi | 2007-05-12 02:04:01 -0400 (Sat, 12 May 2007) | 1 line

Implemented a back end to get type name and type value for ClipboardExtendedPlugin. ClipboardExtendedPlugin is just a API to get clipboard. actual mechanism is written in sqUnixX11.c. And sqUnixXdnd.c was modified to handle multiple data types. When drag event with image type is come, sqUnixXdnd.c generate DropFileEvent with zero file count. Then, system will retrieve data from getSelectionData() with XdndSqueakSelection.
------------------------------------------------------------------------



More information about the Vm-dev mailing list