I'm currently working on implementing support for .msstyles themes (of which are used by XP) primarily because the format follows the API pretty closely and will be easier to test my implementation against an XP box.
One nice thing about .msstyles themes is they are basically just a resource-only DLL, which could of course include exported functions.
Going along that path, one possible way to integrate theme support from your native window manager is to extend the .msstyles theme format to enable using exported functions for drawing some controls, which could then make direct GTK/etc calls.
Another possible method would be to create a conversion tool to create an .msstyles theme from a GTK theme, or to simply create a totally new method of defining themes for WINE.
On Wednesday 01 October 2003 02:48 am, James Gregory wrote:
Some time ago I started hacking in support for GTK themes. When I first suggested this project to the list there was suggestions that doing it with uxtheme.dll was the way to go. I agreed, but didn't have winxp to play with, so I kept tinkering on this project with the intent of learning a bit more about how wine works (which meant learning a lot about how GDI and X works, though I didn't realise that I'd need to know that stuff when I started on the project). I actually managed to get some results which were starting to look promising (though there's no way I'd submit that code as a patch). Screenshots here (the checkbox being the only important part):
http://james.id.au/wine/wine-ss1.png http://james.id.au/wine/wine-ss2.png http://james.id.au/wine/wine-ss3.png
Anyway, the reason I'm posting is not to suggest that this code be used (nor the approach I took), but to mention that if theming code is to be written that I think it's really important to have a way to pass off rendering of controls etc to a .so that can be dlopened and called with dlsym. IIRC the existing system uses a function lookup table, so there shouldn't be much that needs to change for this to occur -- only the initialisation of this function table and probably some hooks so that these .sos can detect whether or not they'll work with the current configuration (as an example the way I was doing gtk theming won't work with anything that isn't x11drv. I don't like breaking encapsulation like this, but it sounds like it's practical in this case). I don't know if I can be of any help, but I'm interested in trying -- please keep me posted.
James.