Theming Support

Mike Hearn mh at
Sun Aug 28 08:35:10 CDT 2005

On Sun, 28 Aug 2005 14:58:07 +0200, Frank Richter wrote:
> Wouldn't it be possible to, say, have the GTK theming draw to a pixmap
> (GdkPixmap or so, afaik with my meager GTK knowledge), get a raw data
> buffer (RGBA or so) and draw this with Win32 APIs (e.g. AlphaBlend())?

It might. There are actually two issues here:

1) How to integrate GTK+/Win32 drawing
2) All the usual issues with using GTK+ theming engines.

(2) covers things like building fake widget objects to please theme
engines that assume they have access to a real GTK+ widget (many do). So
it's not totally trivial, but as Firefox and OpenOffice both do it we
should be able to do so also.

Drawing GTK+ widgets to a double buffer then blending sounds very slow.
Cairo was designed to do hardware accelerated drawing via XRENDER, it'd be
a shame to throw that away. Perhaps a better way is to extend our GDI so
it is possible to mix regular GDI and Cairo drawing together (for instance
by setting the Cairo clip region/pen color to the GDI equivalents before
passing control to the theming engine)? Alexandre would know for sure.

thanks -mike

More information about the wine-devel mailing list