Re: Two gtk_main() ?? What to know ?
- From: Owen Taylor <otaylor redhat com>
- To: Sven Anders <anderss fmi uni-passau de>
- Cc: gtk-list redhat com
- Subject: Re: Two gtk_main() ?? What to know ?
- Date: 07 Sep 1999 12:26:00 -0400
Sven Anders <anderss@fmi.uni-passau.de> writes:
> Hello !
>
> I want to use two gtk_main() in my program. I know it is possible.
> What I want to know is, has anybody experience with it and what do
> I have to pay attention to ?!
> Are there any pitfalls ? Any "must not"'s ?
> What do I have to know in addition ?
I'm not quite sure what you mean by "two gtk_main()"
One possibility is a recursive gtk_main(). That is, in
some callback, calling gtk_main().
This is a commonly used way to handle model dialogs - something
like:
gtk_window_set_modal (GTK_WINDOW (dialog));
gtk_signal_connect (GTK_OBJECT (dialog), "destroy",
GTK_SIGNAL_FUNC (gtk_main_quit()), NULL);
gtk_widget_show (dialog);
gtk_main();
The other possibility is that you mean two separate main
loops running in two separate threads. This isn't possible
currently. (In retrospect, this was one of the things I
should have done differently in the GLib main loop
design).
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]