[Vm-dev] Extended Clipboard

Eliot Miranda eliot.miranda at gmail.com
Fri Mar 24 22:41:58 UTC 2023


Hi Juan, Hi All,

On Thu, Mar 23, 2023 at 6:19 PM Juan Vuletich <juan at 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...

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 at free.fr>
> <hfern at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20230324/fb18cc99/attachment.html>


More information about the Vm-dev mailing list