Re: [gtkmm] Re: pthreads with gtk/gtkmm



On Tue, 18 Feb 2003 17:11:31 +0000
Enrico Costanza <ec142 york ac uk> wrote:

> void *test(void *arg){
>   Args *a = (Args *) arg;
You should really use static_cast<Args *>(arg) here.

>   Gtk::Main kit(a->argc, a->argv);
>   gdk_rgb_init(); //initialize gtk rgb, used to display images
I guess you can delete the gdk_rgb_init().

>   MyCameraFramework myCameraFramework(640, 480, false);
>   kit.run();
I am not sure whether it is allowed to place the Gtk::Main in
a thread which is not the main thread. Better try to put the GUI
into the main thread.

>   cout << "run returned" << endl;
>   return NULL;
Hm, I'd rather use

throw Glib::Thread::Exit;

> }

> How/where can I learn about them?
Central place of information is the Gtkmm reference manual.

Leslie



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]