gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnustep on windows


From: Richard Frith-Macdonald
Subject: Re: gnustep on windows
Date: Sun, 2 Mar 2008 20:02:47 +0000


On 1 Mar 2008, at 17:18, Paul Fox wrote:

When programming with GNUstep you will be working against the GNUstep
drawing API, not cairo or GDI. It is true that the implementation of
this API for cairo is more complete, but even that may be changed.

Oh, I know, but it doesn't make a lot of sense to maintain multiple backends when one will serve. Also GDI vector drawing looks ugly and Cairo looks nice... so I'd prefer to use Cairo. That way, my results should be pretty much the same on Windows and Linux.
You might be talking about [Camaelon][1] (spelling is important).

I have read a bit about Camaelon, but my understanding is that it's a theming engine rather than an API. I also have the impression that it's a bit slow because it's pixmap-based. I was looking at the Narcissus theme engine, but the developer made the comment that his patch to NSScroller to enable theming of the scroller was rejected because it didn't conform to the theming API that had been planned. I haven't really been able to find out much about this API, however.

Look at GSTheme.[hm] in the gui library and the Thematic developer app.

The theming stuff is *very* rudimentary so far, but the core framework is there for themes to be loaded and changed at runtime.

A theme is a loadable bundle with resources and (possibly) code.

The code is in the GSTheme class (or a subclass of it).

The idea is that the controls in the gui should eventually draw themselves entirely in terms of methods in the GSTheme class (most of which are yet to be defined) ... and that those methods can draw things in terms of pixmaps (code already in place to support tiling of pixmaps etc to draw frames/rectangles) or can draw directly (when the theme developer provides a subclass of GSTheme in their theme bundle).

So ... given that the theming API is not yet defined, anyone interested has a good opportunity to shape that API. The Narcissus theme patch was not really rejected ... rather the author was asked to rework it to fit in with the GSTheme concept ... ie the drawing code should be added to GSTheme, and NSScroller modified to call the new methods which are added. Any API added should be well designed ... so that it can easily be implemented using pixmaps as well as using hard-coded methods in a GSTheme subclass.

So ... the ideal way to add some theming would be ...

1. Design a new method/methods for GSTheme ... add them to the headers.
2. Alter the gui controls to use the new methods
3a. Implement them in the GSTheme base class in terms of using pixmap images with the existing methods 3b. Write a GSTheme subclass to implement the new methods with hard- coded drawing rather than pixmaps for performance
4. Modify Thematic to support the new stuff.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]