On Sun, 2001-08-26 at 04:57, Jonathan Doh wrote:
Hello, Is there a way to "wait until a signal is emitted" within a function?
Yes there is, though you'd be waiting for the termination of a gtk_main...
I have a modal dialog, which I need to wait to get a user's selection from before returning from a function, and am wondering how to do this... In other words, how could I do something like this: int function() { pop_up_some_modal_dialog_box(); // this is easy to code // wait until the user presses 'ok', or 'cancel', or the close box return what_the_user_chose(); // this is easy to code }
I've attached a program that does more or less that. The "wait" call is a call to gtk_main(), that starts a second event loop. The return is a gtk_quit() that stops that event loop and returns from the gtk_main() call. /mailund -- I didn't claw my way to the top of the food chain to eat vegetables!
Attachment:
main.c
Description: Text Data