[cl-cairo2-devel] XLib-context and UIs
Joubert Nel
joubert at joubster.com
Tue Aug 14 00:54:57 UTC 2007
Hello Tamas,
On Sun, 2007-08-12 at 22:16 +0200, Tamas K Papp wrote:
> > 1) There's an xlib-context example, but the windows are fixed-size. Is
> > it possible to make resizable windows?
>
> The main problem with X is refreshing the window when X asks for it
> (ie the window receives an Expose event). In order to do it
> correctly, you either have to keep track of all operations or
> double-buffer. cl-cairo2 does the latter, as it is easier to
> implement, but this does not allow resizing.
>
> Peter Hildebrandt experimented with the former approach:
>
> http://groups.google.com/group/comp.lang.lisp/msg/9258d245145323b3
>
> you might want to ask him about the current status. This approach
> would allow resizing, but is more complicated. If you know what
> subset of cl-cairo2 you will be using, perhaps you can get away
> implementing recording operations for that subset.
I was thinking the same approach, since redrawing might include
re-spacing/changing layout of items, and not merely "drawing them
again". Previously, I used CL-Cairo and created the Cairo context within
a GDK window. This gave me sizing as well as mouse events etc.
>
> > 2) Is it possible to receive mouse and keyboard events int the
> > xlib-context?
>
> The framework is there, you just have to write and event handler.
>
> A new version of cl-cairo2 will be released tomorrow, which contains a
> rewritten x11 surface, implemented entirely in Lisp using CFFI (no
> extra C glue). If you want to refine the event handler, I suggest you
> wait for that and your job will be much easier.
I see it is up on common-lisp.net. I should give it a try - will let you
know what I find.
Joubert
PS: have you looked at the Lispbuilder project? What are your thoughts
on it?
More information about the Cl-cairo2-devel
mailing list