I lose in threads + GTK+, looking for help



Welcome!

So far I wrote a few small applications, which were a multithread programs
based on GTK+. However now I'm working on something "bigger" and after 10
days of fighting with code and stupidity of win32 platform I fell now like
total noob... :|

What I should do, if I want execute function, which call some gtk_*
functions form GTK+ callback function? How I should use gtk_threads_enter ()
and gdk_threads_leave ()? Should it look like this, or not:

void some_function (void) {
gdk_threads_enter ();
/* Some gtk_* functions here */
gdk_threads_leave ();
}

void example_gtk_callback_function (void) {
gdk_threads_leave ();
some_function ();
gdk_threads_enter ();
}


--
Pozdrawiam!
Tom



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