[Xcb] Building UI Elements using XCB

Gulshan Singh gsingh_2011 at yahoo.com
Sat Sep 7 08:05:32 PDT 2013


Thanks for the replies.

I think I'll try both drawing to the main window and using a
window-per-widget and see which one I like.

I was considering using Cairo, but there's even less documentation on Cairo
than there is on XCB, so I'll probably hold off on learning that.

If I would like to load a pixmap from a file to be the background of the
button, how would I do that?


On Sat, Sep 7, 2013 at 1:33 AM, Bart Massey <bart at cs.pdx.edu> wrote:

> Don't let what "modern toolkits" do dissuade you from a
> window-per-widget approach, though: it works fine, and is worlds
> easier in most ways.
>
> You probably want to write your toolkit output mostly atop Cairo, BTW;
> the harder part is input handling. I don't have a great example lying
> around, I'm afraid...
>
> --Bart
>
> On Fri, Sep 6, 2013 at 7:52 PM, Josh Triplett <josh at joshtriplett.org>
> wrote:
> > On Fri, Sep 06, 2013 at 09:24:32PM -0400, Gulshan Singh wrote:
> >> Hi, I'm new with XCB. Are there any examples of making UI elements such
> as
> >> buttons or input boxes? Would each UI element just be a xcb_window_t so
> it
> >> can listen for events?
> >
> > Modern toolkits normally don't use an X Window for each widget; they
> > just draw directly to the main window, and the event loop checks events
> > against the bounds of the various widgets.
> >
> > - Josh Triplett
> > _______________________________________________
> > Xcb mailing list
> > Xcb at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/xcb
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20130907/5b16b138/attachment.html>


More information about the Xcb mailing list