[cairo] Interested in XCB (but not GSoC)

Behdad Esfahbod behdad at behdad.org
Wed Apr 9 08:44:30 PDT 2008


On Mon, 2008-03-31 at 09:53 -0400, Felix Rabe wrote:
> Hi,
> 
> I recently found an interest to start programming a level below GTK+,
> i.e. with XCB, and would like to use Cairo for the drawing there.  I
> thought of XCB as being the "new cool thing" (compared to XLib) to write
> X clients, so I'm astonished to read on the GSoC ideas page that XCB is
> not maintained.
> 
> I would like to keep in touch with what is going with the XCB backend
> and cooperate with Thomas Coppi if I eventually find the time and / or a
> patch to contribute.  I study Christian Theology and thus have
> completely different priorities and won't be available to join GSoC, but
> I am a hacker at heart too and would like to find new ways of using
> computers.  I own an OLPC XO-1 (G1G1; I use that to learn Hebrew
> currently) and will buy an OpenMoko device ASAP (summer) and like to
> experiment with user interfaces both on "desktop computers" and on those
> devices.
> 
> I mainly program in Python, but am fluent in C, some C++, and use Git
> wherever possible.
> 
> My specific interests right now concerning XCB are:
> 
> - Does Cairo-XCB work at all?  (Not tested yet, will compile in the next
> days.)
> - How were PS/PDF merged?  (Thomas or somebody, please post your Git
> commit hashes or mailing list findings to the mailing list.  I'll do
> likewise should I find something first.)
> - How do we merge XCB and XLib?

Checkout a snapshot of cairo from the time that he XCB backend was
added.  Compare the xlib and xcb backend of that snapshot, write down
all the differences.  Then take the current cairo-xlib-*, restructure it
to have a unified set of objects cairo_x11_display_t,
cairo_x11_screen_t, cairo_x11_visual_t, cairo_x11_drawable_t, and
perhaps cairo_x11_operations_t.  Then have cairo-xlib-surface.c and
cairo-xcb-surface.c implement those, with the common code (most of
what's currently in cairo-xlib-surface.c) in cairo-x11-operations.c.
Something like that...

We do need to embrace xcb's more flexible error handling though.  That's
one of the major benefits of xcb over xlib.

behdad



> - Who will maintain XCB and/or the merged XCB/Xlib backend?
> 
> Caveat: my X programming experience (in contrast to GTK+) is practically
> non-existing.  I've just read and tried some of the Xlib and XCB
> tutorials that I could find on the net in the past few weeks.  Any
> pointers to XCB documentation (guess I'll have to read
> http://xcb.freedesktop.org/ProtocolStubApi/ next and print out that
> proto postscript thing) and "this is the book you need to read to
> understand X" are welcome.
> 
> Greetings,
> Felix

-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759



More information about the cairo mailing list