The first piece of my SDL-gui-backend experiment has been merged into
the main SDL repository. I've been looking at what SDL needs to be
useful as a backend for GUI toolkits. This isn't so much a question of
"how do I build a UI with SDL," but more like, "what would something
like GTK+ need to talk exclusively to SDL instead of X11?"
As a first target, we added what Unreal Engine 4's Slate UI toolkit
would need to never talk directly to X11 on Linux, since the added
requirements were pretty modest.
Here's the merge, modulo a few patches on top to get it to compile:
https://hg.libsdl.org/SDL/rev/dc80dc0bd22e
The documentation on the new functions are right at the top of the
patch, if you scroll down a little. All of the new stuff works on Mac,
Windows, and X11, probably isn't relevant to iOS/Android/etc, and still
needs support for Wayland, Mir, and Haiku.
This experiment will continue. I'm not sure what else, if anything else,
will be added, yet. There's a delicate balance to SDL, and you don't
want to go crazy adding things like this, especially when the primary
use is games, but I'm interested in finding cases like Slate--can mostly
use SDL, just needed X11 for a few special items--and seeing if we can
make those cases more portable.
--ryan.
the main SDL repository. I've been looking at what SDL needs to be
useful as a backend for GUI toolkits. This isn't so much a question of
"how do I build a UI with SDL," but more like, "what would something
like GTK+ need to talk exclusively to SDL instead of X11?"
As a first target, we added what Unreal Engine 4's Slate UI toolkit
would need to never talk directly to X11 on Linux, since the added
requirements were pretty modest.
Here's the merge, modulo a few patches on top to get it to compile:
https://hg.libsdl.org/SDL/rev/dc80dc0bd22e
The documentation on the new functions are right at the top of the
patch, if you scroll down a little. All of the new stuff works on Mac,
Windows, and X11, probably isn't relevant to iOS/Android/etc, and still
needs support for Wayland, Mir, and Haiku.
This experiment will continue. I'm not sure what else, if anything else,
will be added, yet. There's a delicate balance to SDL, and you don't
want to go crazy adding things like this, especially when the primary
use is games, but I'm interested in finding cases like Slate--can mostly
use SDL, just needed X11 for a few special items--and seeing if we can
make those cases more portable.
--ryan.