[Y-devel] shapes?

Peter Prohaska pitrp at wg78.de
Thu Feb 26 12:06:05 GMT 2004


On Wed, Feb 25, 2004 at 10:47:32PM +0000, Mark Thomas wrote:
> >    Cairo is lightweight, look at the sources, it is really small. 
> >And it doesnt rely on X directly, just trough one of its backed 
> >namely the Xrender backend.
> 
> I noticed that.  It also looks very finished.  I wonder whether the best 
> solution would be to embed (a fork of) cairo directly into Y 
> specifically tailored for Y.  Essentially it would mean that a Y painter 
> has an API that looks suspiciously like the cairo API :)

Perhaps cairo should be used as a lib and the Y api should be a
lightwight abstraction layer for whatever library is used.
Much like the aproach with the video drivers like Y running on sdl etc.
Y would provide a toolkit interface and a way to identify objects
for the messaging system.

A cairo toolkit module would have to implement all the functions
required by that interface and make the apropriate calls to cairo.
That way one could use cairo to get going and still work on a native Y
toolkit in parallel.
The big problems with this approach are:
- a slight loss in speed
- the need of a well defined way to handle themes and alike

The positive thing is that one yould use every toolkit that provides
enough functionality to be used in the Y way.
Concerning the spirit of Y, it would fit well with the dream of
modularity and extensibility but on the other hand this could easily
lead to inconsisteny and a hard time if you want to change interfaces.

> 
> I'm not sure how this would be done.  Would someone like to take a look 
> at this?  Is it OK to incorporate MIT-licensed stuff into a GPL program? 
>  What should it be redistributed as?
> 
> I think a stable, good, Painter API should be one an acceptance 
> criterion for Y 0.3.

Heya, the first milestone :)

  peter.



More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved