[Kde-bindings] How to mix DCOP c++ code with C?
Pau Garcia i Quiles
pgquiles at elpauer.org
Mon Sep 8 07:17:25 UTC 2008
Quoting Jacques Pelletier <jpelletier at ieee.org>:
> Hi,
>
> I would like to use DCOP in a GTK C environment. Since the DCOP C bindings
> seems to be dead/inactive, I would like to know if it's possible to mix c++
> code (for accessing DCOP) with the C code of the rest of the program.
Why would you want to use DCOP? It's a dead technology, replaced by
DBUS in KDE4. There is a dbus-glib library:
http://dbus.freedesktop.org/releases/dbus-glib/
With regard to using C++ with C, yes it should be possible. You will
need to write a C wrapper around the C++ library (a C function to
access each C++ method -don't forget overloaded methods- you need to
use) and use extern "C".
The most troublesome part might be the Qt event loop, you may need to
build a special Qt 3 with glib event loop support. Take a look at
http://www.scheinwelt.at/~norbertf/common_main_loop/ (totally
unsupported and not carried by any distribution).
--
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
More information about the Kde-bindings
mailing list