gnustep / libs-back

The GNUstep gui library is a library of graphical user interface classes written completely in the Objective-C language; the classes are based upon Apple's Cocoa framework (which came from the OpenStep specification). *** Larger patches require copyright assignment to FSF. please file bugs here. ***
http://www.gnustep.org
GNU General Public License v3.0
50 stars 34 forks source link

Add headless backend #42

Closed qmfrederik closed 1 year ago

qmfrederik commented 1 year ago

This is another attempt to add a headless backend to GNUstep. The goal is to be able to run code which interacts with libs-gui in environments where no display is available. Think legacy applications running in Docker containers and similar environments.

This PR takes a minimalistic approach, and adds an implementation of GSContext and GSDisplayServer which overrides just enough methods for the headless server to support the workloads I've tested against.

As part of this PR, I've also had to run autoreconf. That generated some noise because I used a newer version of autoreconf. That noise is in 1ec7eb6ecbac4c8a97a1c870c1dfeecbfc273bc4, for which I can generate a separate PR if that makes it easier to review.

qmfrederik commented 1 year ago

@fredkiefer Let me know if this approach works for you. I'd be happy to make changes to this PR based on your feedback /cc @gcasa

fredkiefer commented 1 year ago

Apart from the copyright this looks great. And if we ever need to create PDFs from a headless system we just need to support the headless/cairo combination, similar to cairo in win32.

qmfrederik commented 1 year ago

Thanks, @fredkiefer. I went over the headers for files and streamlined their formatting (and reference the Lesser GPL instead of the Library GPL). I hope the current format is acceptable to you; let me know if you require any changes.

fredkiefer commented 1 year ago

We will have to wait for a decision by @gcasa here. I don't know whether we want to accept code that is dual copyrighted. Most likely this is not valid in most countries. In this specific case it is also quite trivial code maybe it would be possible for you to remove the Keysight copyright?

gcasa commented 1 year ago

TestPlant, and therefore Keysight as its successor, signed a corporate copyright disclaimer this should cover anyone that contributes to GNUstep from Keysight.

Proof of this can be obtained from the FSF and it should be on the disclaimers page on the website (I will share that address in a subsequent reply).

That being said @qmfrederik i don't think the "Copyright Keysight" notice is needed as I believe simply putting in your name and keysight email address as the author is sufficient.

gcasa commented 1 year ago

Here is the relevant page on the site...

https://gnustep.github.io/developers/copyright.html

It's near the end. I believe I have the email from the copyright clerk in my gmail account as well.

qmfrederik commented 1 year ago

I updated the copyright statements to be in line with those found at https://github.com/keysight-eggplant/libs-back. I hope that helps.

gcasa commented 1 year ago

@fredkiefer @qmfrederik all good.