On Fri, Mar 24, 2023 at 03:41:58PM -0700, Eliot Miranda wrote:
>
> Hi Juan, Hi All,
>
> On Thu, Mar 23, 2023 at 6:19???PM Juan Vuletich <juan@cuis.st> wrote:
>
> > Hi Folks,
> >
> > I was pretty sure I had seen _something_ about a ClipboardExtendedPlugin
> > for Linux at some time.
> >
> > Found it. It seems it was part of an OLPC Etoys specific branch of the old
> > interpreter vm. I don't know how complete this was, or if it was actually
> > used. Anyway, in case it is of any use, see
> > http://squeakvm.org/svn/squeak/branches/olpc/platforms/unix/src/plugins/ClipboardExtendedPlugin/
> >
>
> Alas this isn't unix specific. It is the generated plugin, which in this
> case (and in several other plugins, such as the FilePlugin and the
> SocketPlugin) is just the platform-independent wrapper around the
> platform-specific functionality. The source doesn't really belong there.
> In OpenSmalltalk you'll find it only in
> src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c. So...
>
Here is some background that I hope may help.
Juan's pointer above was off by just a bit, the platform source in the
olpc branch with original commits by author takashi is at:
http://squeakvm.org/cgi-bin/viewvc.cgi/squeak/branches/olpc/platforms/unix/plugins/ClipboardExtendedPlugin/
This was one of several plugins from olpc that Ian added to the SVN trunk
in 2008:
------------------------------------------------------------------------
r1860 | piumarta | 2008-04-28 15:15:56 -0400 (Mon, 28 Apr 2008) | 1 line
add generated code for Rome, Kedama, Aio, ImmX11, Ogg, ClipboardExtended, Kedana2, GStreamer, DBus plugins
------------------------------------------------------------------------
r1859 | piumarta | 2008-04-28 15:11:59 -0400 (Mon, 28 Apr 2008) | 1 line
add platform support for new plugins
------------------------------------------------------------------------
So the unix platform source along with cmake build support is now here:
http://squeakvm.org/cgi-bin/viewvc.cgi/squeak/trunk/platforms/unix/plugins/ClipboardExtendedPlugin/
The source appears to be incomplete (I don't know why it was not finished):
http://squeakvm.org/cgi-bin/viewvc.cgi/squeak/trunk/platforms/unix/plugins/ClipboardExtendedPlugin/sqUnixExtendedClipboard.c?revision=1859&view=markup
This plugin builds cleanly on unix and it runs, but I do not know if
it does anything useful at this point. I keep an up to date interpreter
VM on my pc, and here are the contents of the VM folder:
$ ls -l /usr/local/lib/squeak/4.20.4-3822/
total 7180
-rwxr-xr-x 1 root root 33264 Jan 16 11:29 ckformat
-rw-r--r-- 1 root root 28616 Jan 16 11:29 so.AioPlugin
-rw-r--r-- 1 root root 229088 Jan 16 11:29 so.B3DAcceleratorPlugin
-rw-r--r-- 1 root root 58656 Jan 16 11:29 so.CameraPlugin
-rw-r--r-- 1 root root 32200 Jan 16 11:29 so.ClipboardExtendedPlugin
-rw-r--r-- 1 root root 90072 Jan 16 11:29 so.DBusPlugin
-rw-r--r-- 1 root root 28336 Jan 16 11:29 so.FileCopyPlugin
-rw-r--r-- 1 root root 87512 Jan 16 11:29 so.FT2Plugin
-rw-r--r-- 1 root root 35632 Jan 16 11:29 so.HostWindowPlugin
-rw-r--r-- 1 root root 35240 Jan 16 11:29 so.ImmX11Plugin
-rw-r--r-- 1 root root 176048 Jan 16 11:29 so.KedamaPlugin2
-rw-r--r-- 1 root root 927416 Jan 16 11:29 so.Mpeg3Plugin
-rw-r--r-- 1 root root 194808 Jan 16 11:29 so.RomePlugin
-rw-r--r-- 1 root root 121344 Jan 16 11:29 so.ScratchPlugin
-rw-r--r-- 1 root root 243304 Jan 16 11:29 so.Squeak3D
-rw-r--r-- 1 root root 116896 Jan 16 11:29 so.SqueakFFIPrims
-rw-r--r-- 1 root root 161568 Jan 16 11:29 so.SqueakSSL
-rw-r--r-- 1 root root 53824 Jan 16 11:29 so.UnicodePlugin
-rw-r--r-- 1 root root 134304 Jan 16 11:29 so.UnixOSProcessPlugin
-rw-r--r-- 1 root root 26712 Jan 16 11:29 so.UUIDPlugin
-rw-r--r-- 1 root root 229784 Jan 16 11:29 so.VectorEnginePlugin
-rw-r--r-- 1 root root 47136 Jan 16 11:29 so.vm-display-custom
-rw-r--r-- 1 root root 149528 Jan 16 11:29 so.vm-display-fbdev
-rw-r--r-- 1 root root 26536 Jan 16 11:29 so.vm-display-null
-rw-r--r-- 1 root root 357312 Jan 16 11:29 so.vm-display-X11
-rw-r--r-- 1 root root 26104 Jan 16 11:29 so.vm-sound-custom
-rw-r--r-- 1 root root 35656 Jan 16 11:29 so.vm-sound-NAS
-rw-r--r-- 1 root root 16616 Jan 16 11:29 so.vm-sound-null
-rw-r--r-- 1 root root 47264 Jan 16 11:29 so.vm-sound-pulse
-rw-r--r-- 1 root root 29840 Jan 16 11:29 so.WeDoPlugin
-rw-r--r-- 1 root root 27752 Jan 16 11:29 so.XDisplayControlPlugin
-rwxr-xr-x 1 root root 3484728 Jan 16 11:29 squeakvm
This means we have a running plugin available, and the missing
implementation needs to be filled in as Eliot explains below.
Finally, I note that the original commit notice by takashi explains
the plugin design, and points to implementation code in sqUnixX11.c:
http://squeakvm.org/cgi-bin/viewvc.cgi/squeak?view=revision&revision=1673
I think that this topic originated from a question on the Cuis list.
Cuis maintains a V3 version of the image that can run on an interpreter
VM, so if someone is working with Cuis on Linux, you may want to check
and see if the existing plugin might actually be working. Or if you
can explain what I should look for in Cuis, I can take a look at it
(I know Cuis but I don't really know anything about how this plugin
is used in the image).
HTH,
Dave
> The upper level of a plugin which is generated from VMMaker source is in
> <root>/src/plugins/<PluginName>/<PluginName>.c
> It is generated from a class called <PluginName> that inherits from
> InterpreterPlugin in category VMMaker-Plugins.
> The header file that defines the interface between the plugin and any
> platform-specific code is typically in
> <root>/platforms/Cross/plugins/<PluginName>/<PluginName>.h
> and in this case is missing (which should be fixed).
> The various implementations of platform-specific code are often in
> <root>/platforms/{iOS,unix,win32,etc}/plugins/<PluginName>/
> sq[Mac,Unix,Win32,etc}<PluginName>.{c,cc,m,etc}
> but sometimes more than one file is required to implement the plugin
> internals.
> For example, the SoundPlugin typically requires a handful of source files
> and occasionally a specific makefile.
>
> HTH
>
> Thanks,
> >
> > On 3/23/2023 9:58 PM, Eliot Miranda wrote:
> >
> >
> >
> > Hi Hilaire,
> >
> > On Mar 23, 2023, at 2:38 PM, Hilaire Fernandes <hfern@free.fr>
> > <hfern@free.fr> wrote:
> >
> > ???
> >
> > Hi Eliot,
> >
> > I will try to take a deep look as I have also interest for tablet support
> > on Linux. This is a completely new domain (VM) for me.
> >
> >
> > I hope you find it fun!
> >
> > Your job is to implement this interface:
> >
> > void sqPasteboardClear(void *inPasteboard);
> > sqInt sqPasteboardGetItemCount(void *inPasteboard);
> > sqInt sqPasteboardCopyItemFlavorsitemNumber(void *inPasteboard, sqInt
> > formatNumber);
> > void *sqCreateClipboard(void);
> > void sqPasteboardPutItemFlavordatalengthformatTypeformatLength(void
> > *inPasteboard, char *inData, sqInt dataLength, char *format, sqInt
> > formatLength);
> > void sqPasteboardPutItemFlavordatalengthformatType(void *inPasteboard,
> > char *inData, sqInt dataLength, sqInt format);
> > sqInt sqPasteboardCopyItemFlavorDataformatformatLength(void
> > *inPasteboard, char *format, sqInt formatLength);
> > sqInt sqPasteboardCopyItemFlavorDataformat(void *inPasteboard, sqInt
> > format);
> > sqInt sqPasteboardhasDataInFormatformatLength(void *inPasteboard, char
> > *format, sqInt formatLength);
> > sqInt sqPasteboardhasDataInFormat(void *inPasteboard, sqInt format);
> >
> > which is present only in src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c,
> > a departure from the house style which would have put it in platforms/Cross/
> > plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.h; no doubt John
> > had his reasons.
> >
> > Use platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.m
> > & platforms/win32/plugins/ClipboardExtendedPlugin/sqWin32ExtendedClipboard.c
> > as guides. The Mac uses strings to identify clipboard types (the char
> > *format, sqInt formatLength) variant, as opposed to win32, which uses
> > integers (the sqInt format variant). Whichever works.
> >
> > You???ll implement it in platforms/unix/plugins/ClipboardExtendedPlugin/
> > sqUnixExtendedClipboard.c
> >
> > Thanks
> >
> > Hilaire
> > Le 23/03/2023 ?? 21:05, Eliot Miranda a ??crit :
> >
> > As John said it doesn't appear to exist for Linux. But X11 has a
> > clipboard and implementing the innards for X11 shouldn't be that
> > difficult. The only complication is that if one wants to do the job
> > "properly" one has to extend the indirection scheme Ian Piumarta came up
> > with so that it can work on the other graphical back-ends such as the raw
> > frame buffer. Hillaire, if you're interested in implementing the X11
> > ExtendedClipboard internals I'm happy to answer any questions you have.
> >
> > --
> > GNU Dr. Geohttp://drgeo.euhttp://blog.drgeo.eu
> >
> >
> >
> > --
> > Juan Vuletichcuis.stgithub.com/jvuletichresearchgate.net/profile/Juan-Vuletichindependent.academia.edu/JuanVuletichpatents.justia.com/inventor/juan-manuel-vuletichlinkedin.com/in/juan-vuletich-75611b3twitter.com/JuanVuletich
> >
> >
>
> --
> _,,,^..^,,,_
> best, Eliot