dbus and Xlib integration
hp at redhat.com
Thu Mar 24 11:20:13 PST 2005
On Thu, 2005-03-24 at 22:33 +0600, Alexey Morozov wrote:
> Has anybody already written a pure Xlib application with dbus event
> loops support (not Gtk, Glib nor Qt).Just pure XPending() and the family?
> I'd like to see approaches other than plain dumb polling for X and d-bus
> events interchangeably, if it's possible, smth like select or smth.
You mean something like the GLib or Qt main loop? ;-) You realize the
GLib loop isn't in any way tied to X or gtk. If you go back in CVS to
the oldest versions of metacity there's an example of gtk-less usage of
it with Xlib.
If you don't use a library main loop you have to write pretty much the
same thing yourself, a kind of select() multiplexer. There's a kind of
crappy one in dbus-mainloop.c in the dbus tree.
More information about the dbus