|
|
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » DBus integration -- need help (Adding DBus to an existing U++ app on Linux -- need help on main event loop)
DBus integration -- need help [message #48544] |
Thu, 20 July 2017 17:30 |
jlfranks
Messages: 57 Registered: May 2007 Location: Houston, TX, USA
|
Member |
|
|
We are trying to add a DBus server to existing large U++ application that runs only on Linux.
I've converted from X11 to GTK for Upp project config to be compatible with GIO dbus library.
I've created a separate thread for the DBus server and ran into problems with event loop.
I've gutted my DBus server code of everything except what is causing an issue.
DBus GIO examples use GMainLoop in order for DBus to service asynchronous events.
Everything compiles and runs except the main UI is not longer visible. There must be a
GTK main loop already running and I've stepped on it with this code. Is there a way for
me to obtain a pointer to the UI main loop and use it with my DBus server?
How/where can I do that?
Code snipped example as follows:
---- code snippet ----
myDBusServerMainThread()
{
//========================================================== =====
//
// Enter main service loop for this thread
//
while (not needsExit ()) { // colaborate with join()
GMainLoop *loop;
loop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(loop);
}
}
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sat Sep 21 03:38:19 CEST 2024
Total time taken to generate the page: 0.02829 seconds
|
|
|