[Xcb] ANNOUNCE: X Haskell Bindings 0.3
Antoine Latter
aslatter at gmail.com
Mon Jun 29 10:07:34 PDT 2009
On Mon, Jun 29, 2009 at 10:39 AM, Barton C Massey<bart at cs.pdx.edu> wrote:
>
> The suggested approach, as I think you understand, is to
> bind to the XCB bottom-half. You can use the socket handoff
> mechanism, which allows you to continue to generate the
> protocol stream using your current code, while allowing
> folks to integrate Xlib and C/XCB code into XHSB apps.
>
> One thing really lacking in XCB right now is adequate
> documentation for this interface. We've been talking about
> what to do about that.
>
The interface in xcbext.h looks a lot more convenient for sending out
my own requests (specifically xcb_send_request).
It looks like if I go through that interface, libxcb will still be
taking care of a lot of the lower-level details, and I don't need to
worry about the socket-handoff.
If I go through the socket-handoff API it isn't clear to me how I
would send checked requests. And it looks like xcb_send_request is the
place where we handle the needs for "quirky" requests.
The plan would be to take the higher-level Haskell data-structres,
write them out to bytes, and then send them off to xcb_send_request.
Then I would take the bytes from xcb_wait_for_event, xcb_request_check
and xcb_wait_for_reply and pass them off to my Haskell deserialization
functions.
The only wrinkles are
- The extended sequemce that libxcb inserts sometimes when pulling
bytes off the wire
- Figuring out the mapping from event/error numbers to the extension
which produced it - since the Haskell code doesn't own the extension
cache anymore, this could be tricky.
Antoine
More information about the Xcb
mailing list