Similar to the request to autoconnect GTK 3 themes content interfaces, I’d like to request the same for a set of content interfaces intended to provide GTK 2 theme data.
GTK 2 themes are comprised of two parts:
- theme data files found in the same
$datadir/themeshierarchy as other theme data. This is in a custom “gtkrc” format that sets various properties on widgets and applies “theme engines” to control how they are painted.
- theme engines, which are native code shared libraries.
I’ve mirrored this division by providing the two components as separate content interfaces:
gtk-2-themes, provided by
gtk-common-themes: the architecture independent declarative theme data.
gtk-2-engines, provided by
gtk2-common-themes: native code theme engines required by the provided themes.
gtk-2-themes slot is modelled after
gtk-3-themes, in that it would allow multiple providers to plug into applications in future. I couldn’t work out a way to do the same for
gtk-2-engines, but that isn’t necessarily a bad thing. There are relatively few theme engines, and I think they warrant tighter control since they are shared libraries that could potentially introduce arbitrary code into applications.
A description of how to write a snap that plugs into these interfaces can be found here:
One area that might warrant some debate is the naming of the
gtk-2-engines interface (and perhaps the snap providing it). As the engines are native code, the obvious question is how they relate to applications using different base snaps. While there is a potential for incompatibilities, I think they are fairly low:
- all the theme engines are comprised of C code without any dependencies outside of GTK’s dependencies, so e.g. 16.04 binaries are likely to work unchanged on an 18.04 base, and anything else with a glibc at least as recent.
- GTK 2 itself is in maintenance mode, with the current 2.24.x series starting in January 2011. Furthermore, GTK’s module ABI has not changed since 2.10.0 (released in 2006).
With all that said, I’d be happy to include something in the interface name to signify the base if that is requested.