<div dir="ltr">A (the?) primary intent of XCB was as a clean platform for people to build innovative GUI toolkits on top of. Glad to hear you're working on one! The questions are fine: I've enjoyed seeing the various alternatives discussed.<br><div><br></div><div>For the record, what I'd probably do: spawn a thread to deal with timers, external fds, etc; spawn a second thread to read and process the X event queue; spawn a third thread to run the GUI rendering process; spawn a fourth thread for the computing engine if desired; have all the threads communicate using a locked shared data structure of some kind.</div><div><br></div><div>But that's just me. You have lots of choices, and they're all going to be fine.</div></div><br><div class="gmail_quote">On Mon, May 25, 2015 at 6:00 AM Cosmin Apreutesei <<a href="mailto:cosmin.apreutesei@gmail.com">cosmin.apreutesei@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> Uhm, which "[1]"?<br>
<br>
Sorry: <a href="http://xcb.freedesktop.org/manual/group__XCB__Core__API.html#ga537e3cea89389382533957444eaa13fd" target="_blank">http://xcb.freedesktop.org/manual/group__XCB__Core__API.html#ga537e3cea89389382533957444eaa13fd</a><br>
<br>
> Eventfd works, too. ;-)<br>
<br>
Same thing :)<br>
<br>
[context: I know that using XCB in conjunction with other UNIX APIs<br>
doesn't seem like a big deal for UNIX people because they assume the<br>
user will use C, after all it's a C API, and all other headers are<br>
available, etc., what's the big deal, right? But XCB made efforts to<br>
keep binary compat between 32bit and 64bit, avoid using macros etc. so<br>
it will be easy to bind to hi-level languages without having to buy<br>
into huge runtimes like Qt and GTK. That's what I'm trying to do, I'm<br>
trying to make a portable GUI lib for LuaJIT[1] so I am looking for a<br>
solution that will have as few dependencies as possible to other UNIX<br>
APIs to avoid having to bind those too and having them as<br>
dependencies. To a C programer it looks like I complain a lot for no<br>
reason.]<br>
<br>
[1] <a href="https://luapower.com/nw" target="_blank">https://luapower.com/nw</a><br>
_______________________________________________<br>
Xcb mailing list<br>
<a href="mailto:Xcb@lists.freedesktop.org" target="_blank">Xcb@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/xcb" target="_blank">http://lists.freedesktop.org/mailman/listinfo/xcb</a></blockquote></div>