Re: [gtkmm] combining GTK with TAO
- From: aaron Lee <liwf nada kth se>
- To: Vladislav Grinchenko <vgrinche integ com>
- Cc: gtkmm-list gnome org
- Subject: Re: [gtkmm] combining GTK with TAO
- Date: Wed, 10 Dec 2003 11:19:18 +0100
Hi, Vlad,
Thanks you for your help. But I am not sure if I have got all of your
idea to settle my situation.
1) I want to develop GUI both for Server and for Client. It means GUI
not only send user's input to client through TAO, but it also need to
receive data from client through TAO and display them as a response. How
to realize?
2) If there is a mutex between GUI and TAO event loop. I mean if TAO is
working to treat some task, GUI should not reponse use's input. Do you
think it is possible?
3) Is there a way to send real-time data continuously generated by
scrollbar widget to a TAO client?
4) I have implemented TAO server/client in a thread. Is it possible to
excute Gtkmm GUI in another thread and then communicate between these
two threads?
Thanks,
Aaron
Vladislav Grinchenko wrote:
Li,
I do it this way:
1) Setup and idle work callback with with Gtkmm event loop.
2) From the idle callback, call TAO event loop to process all
pending work:
#include <tao/corba.h>
class MainWindow {
public:
MainWindow();
int init_orb();
void run_orb_iteration();
void orb_shutdown();
private:
CORBA::ORB_ptr m_orb;
};
MainWindow::
MainWindow () : m_orb (CORBA::ORB::_nil()) { ... }
int
MainWindow::
init_orb ()
{
...
m_orb = CORBA::ORB_init (orbargc, orbargv);
...
}
void
MainWindow::
run_orb_iteration ()
{
/* ORB event loop iteration */
if (!CORBA::is_nil (m_orb)) {
if (m_orb->work_pending ()) {
m_orb->perform_work ();
}
}
}
void
MainWindow::
orb_shutdown ()
{
if (!CORBA::is_nil (m_orb)) {
m_orb->destroy ();
m_orb = 0;
}
}
hope this helps,
Vlad
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]