[Techtalk] More questions about C and GTK+ stuff

Wolfgang Petzold petzold at villa-chaos.de
Thu May 17 16:42:54 UTC 2007


Michelle Konzack:
> Now I have to find out, how I can put the collected data fro,
> my_cool_func() back into the GtkTreeView widget...

Well, in short -- I have no experience.

Looking at your code skeleton, I would try to get some
GTK data structure that you need to update from within
the new thread into the "param" parameter. As far as I
can tell, "param" can be any data structure you like
(e.g. your GtkTreeView widget, or even an array of
widgets), you cast it to "void *" to fit it into the
general signature of the callback function for the new
thread, and since this callback function knows what
data structure it has been given, you should be able
to cast it back.

Does that sound reasonable to anyone else?

Wolfgang


More information about the Techtalk mailing list