[Mono-winforms-list] more gtk look stuff
James Gregory
james@linuxaus.com
04 Aug 2003 18:11:55 +1000
On Mon, 2003-08-04 at 17:58, Roderick Colenbrander wrote:
> Hi James,
>
> Some time ago I emailed with you about this too, congratulations so far.
> Perhaps it is time now to start a full wine theming thread. Perhaps on
> wine-devel too.
>
> The Wine guys love to have some way of theming too. The simple color changing
> stuff is the first step. Just hacking Wine to make it look like GTK is not
> the correct solution and will about sure never make it back in real Wine. It
> won't work for all controls and it is really a hack.
An increasingly common hack it seems. I chose it because I figured it
would be the fastest to see results on, but agreed it isn't the best
solution.
>
> The real solution is to do what WindowsXP is doing. XP is using a special
> theme library called "uxtheme.dll". It can be accessed directly from an app
> but most apps don't use it directly. WindowsXP's control related dlls use it
> too. XP uses two sets of comctl32 and friends. One "old" one and one with
> theming. The comctl32 and other dlls then contain some options to enable
> theming and contain some area in which you can draw. I looked into it a bit
> in the past. Not sure how it fully works but this is the real way to go.
I've heard this. Unfortunately I don't have a copy of windows XP to play
with, but that's what the wine guys said when I raised this.
So you're suggesting that the uxtheme.dll be written to render stuff
with GTK? Does that mean replacing x11drv with a gdkdrv so that there
are GdkDrawables to draw on? If so we're not really departing that far
from the hacky solution -- it's just a bit more compartmentalised.
James.
>
> So in short on XP the core dlls are patched to use uxtheme.dll for theming.
>
> Lets hope this triggers a full thread :)
>
> Thanks,
> Roderick Colenbrander
>
> Op maandag 4 augustus 2003 09:10, schreef James Gregory:
> > Hi all,
> >
> > I posted ages ago about wanting to work on the wine GTK look part of the
> > mono project. It's been a while, but I have actually made some progress.
> > I have code now which will set wine's colours to match the GTK theme
> > (well some of the colours, the rest of them is just a case of me having
> > time and patience to finish it). The other achievement was to get a
> > GdkWindow from the XID that Wine uses to display stuff and map a Gtk
> > Button to it. Alas the button is not as yet displaying, which is why I'm
> > writing. The problem as I see it is simply that the gtk main loop isn't
> > running, so whatever it is that actually draws the button inside the
> > expose event in a normal gtk app just isn't running. The patch is a bit
> > of a mess, but if there's interest I'd love to get some feedback from
> > someone who knows the internals of gtk/gdk a bit better. I'm sure that
> > after I'm over this hurdle, the rest will be far faster and simpler to
> > implement.
> >
> > Thanks,
> >
> > James.
> >
> >
> > _______________________________________________
> > Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>