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 » Thu Jan 24, 2013 9:39 am

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 » Thu Jan 24, 2013 10:04 am

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 » Thu Jan 24, 2013 11:32 am

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 » Thu Jan 24, 2013 1:13 pm

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: No registered users and 44 guests