gtk+ and pthread



I am currently writing an application which, among other things, needs to continually receive data over a UDP connection and display this data in a gtk pixmap. I am having problems running pthread_create() (for receiving data via UDP) and gtk_main() (for display and other buttons) at the same time.

As an alternative, I would like to do the following:
1. Put the UDP receive code into a callback function for a button
2. Associate this function with the click event for a button that will be created but not displayed 3. And... before I call gtk_main() set something so that this button always appears to be clicked or at least being clicked a few times a second or greater

Is this, specifically the third step, possible? If so, a push/kick in the right direction would be greatly appreciated.

Cheers,
David


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com




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