[cl-cairo2-devel] xlib-context / window functionality

Tamas K Papp tpapp at Princeton.EDU
Sun Sep 2 13:35:32 UTC 2007


On Fri, Aug 31, 2007 at 12:27:44PM -0400, Joubert Nel wrote:

> Yes, perhaps I wasn't explicit enough. I am building a widget toolkit
> that aims to be smaller in scope yet fundamentally more flexible than
> either Gtk or Qt. The ideas are taken from the WPF in the .NET Framework
> 3.0, which I know very well.

That's quite a tall order ;-)

> In other words, I would need to extend the xlib bits in cl-cairo2 so
> that my widget toolkit can consume lower-level events that Xlib would
> pass, e.g. mousedown, resize window, key down, etc.

I think that you are better off rendering to an X11 pixmap directly
(without the whole surrounding code) and doing things in your own
event loop.  The current Xlib context of cl-cairo2 has subtle but
annoying bugs that show up under a stress test, I will rewrite the
whole thing soon anyway, so I would not recommend extending it.

> I guess I'm trying to figure out which lower-level library I want to use
> for the drawing + low level events in X.

Cairo is great for doing the drawing in quite a sophisticated way.  I
would suggest that you use cl-cairo2, but instead of just taking the
current Xlib context, render into a plain X11 pixmap or a cairo image
surface (basically, just a chunk of memory).

HTH,

Tamas



More information about the Cl-cairo2-devel mailing list