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/

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> 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. Geo
http://drgeo.eu
http://blog.drgeo.eu


-- 
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich