[Haskell-cafe] Re: [Haskell] ANNOUNCE: X Haskell Bindings 0.2

Antoine Latter aslatter at gmail.com
Sun Feb 22 15:33:47 EST 2009


On Sun, Feb 22, 2009 at 11:58 AM, Achim Schneider <barsoap at web.de> wrote:
>
> I once thought of hacking away on exactly that, but got demotivated by
> the fact that all that xlib code would have to be replaced (including
> xmonad-contrib). While nowadays xlib programs are compatible with xcb,
> because xlib itself is now based on xcb, the haskell xlib bindings
> aren't based on xhb... we'd need xcb bindings, which kinda defeats the
> purpose of xhb.
>

xlib is based on xcb in the sense that libxcb owns the conection, and
xlib takes it when it wants it.  This approach has recently been
generalized, so it should be possible (in principle) for XHB to ride
on top of libxcb in the same way:

http://lists.freedesktop.org/archives/xcb/2008-March/003347.html

But I haven't looked into this approach too deeply, though.  Questions
I don't have answers to:

 + How do I get events/errors back into Haskell-land?
 + How do I get my FFI bindings to xlib to cooperate in all of this?

But it would be great if we could use native Haskell where we can, but
still call into C-libs where we can't.

Antoine


More information about the Haskell-Cafe mailing list