Clipboard from Lua/Löve but system independant?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Ubermann
Party member
Posts: 146
Joined: Mon Nov 05, 2012 4:00 pm

Clipboard from Lua/Löve but system independant?

Post by Ubermann »

How?

I googled for it but couldn't find anything that works in any system supported by LÖVE.

Any idea?
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Clipboard from Lua/Löve but system independant?

Post by kikito »

Not possible with plain Lua from LÖVE. You might be able to do it by implementing the whole functionality in C. The C would have to be platform-specific (win, mac, linux). I don't recommend it.
When I write def I mean function.
User avatar
Ubermann
Party member
Posts: 146
Joined: Mon Nov 05, 2012 4:00 pm

Re: Clipboard from Lua/Löve but system independant?

Post by Ubermann »

kikito wrote:Not possible with plain Lua from LÖVE. You might be able to do it by implementing the whole functionality in C. The C would have to be platform-specific (win, mac, linux). I don't recommend it.
Fok.

Yes, I found some Wondows C implementation for this, but not for Penguins or Apples.

Do you glimpse any solution for this, without using (too much) 3rd party libs?
User avatar
vrld
Party member
Posts: 917
Joined: Sun Apr 04, 2010 9:14 pm
Location: Germany
Contact:

Re: Clipboard from Lua/Löve but system independant?

Post by vrld »

Clipboard support is not as easy as you would expect, because every system does it differently. Sometimes there are even more than one way to do this on one system.
However, SDL 1.3 (or 2.0) will have (a smallest common denominator) clipboard support, so once this comes around LÖVE can have it, too.
You can also have a look at how they will do it here: SDL_windowsclipboard.c, SDL_x11clipboard.c, and SDL_cocoaclipboard.m (plus a ton of other files).

Edit: Links to implementation files
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.

hump | HC | SUIT | moonshine
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 4 guests