From tpapp at Princeton.EDU Sun Sep 2 13:35:32 2007 From: tpapp at Princeton.EDU (Tamas K Papp) Date: Sun, 2 Sep 2007 15:35:32 +0200 Subject: [cl-cairo2-devel] xlib-context / window functionality In-Reply-To: <1188577664.18685.10.camel@joubert-desktop> References: <1188529120.31172.17.camel@joubert-desktop> <20070831154031.GA32446@pu100877.student.princeton.edu> <1188577664.18685.10.camel@joubert-desktop> Message-ID: <20070902133532.GA28413@pu100877.student.princeton.edu> 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