gtk_events_pending() and gtk_iterate()



I have a situation where I need a call-back handler to pop-up a dialog
box, wait for results from it (say clicked ok) and then continue on.
Basically the code would look something like:

void on_some_event(...) {
	/*do some stuff*/
	do_what=message_box("blah");
	if(do_what==OKAY)
	{
	}
	else
	{
	}
}


That gives the picture.  I've read a bit on the net about using a
while(gtk_events_pending()) gtk_iterate(); or something like that.
Basically I need message_box to block until the dialog box is dismissed,
then return something that indicates what happened in the dialog box.  I
assume all events from the dialog box are captured elsewhere and could be
polled by message_box.  The problem is that this is all done on gtk's
thread.  Is there a mechanism or way of doing this?  I could do it the
normal event-capture way, but I need something that works simply for some
other programmers to use.

thanks,
Michael Torrie
BYU CS System Programmer







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