Re: Proposal: gtk_main() quit callbacks
- From: Tim Janik <timj gimp org>
- To: Owen Taylor <owt1 cornell edu>
- cc: Gtk+ MList <gtk-list redhat com>
- Subject: Re: Proposal: gtk_main() quit callbacks
- Date: Sun, 1 Mar 1998 04:22:39 +0100 (CET)
On 28 Feb 1998, Owen Taylor wrote:
>
> Tim Janik <timj@gimp.org> writes:
>
> > hello everyone,
> >
> > i'd like to propose the addition of a gtk_main() quit callback
> > mechanism like so:
> >
> > gint gtk_quit_add (guint main_level,
> > GtkFunction function,
> > gpointer data);
> > gint gtk_quit_add_full (guint main_level,
> > GtkFunction function,
> > GtkCallbackMarshal marshal,
> > gpointer data,
> > GtkDestroyNotify destroy);
> >
> > function will be called when gtk_main () is left if main_level ==
> > gtk_main_level() or main_level==0.
>
> Hmmm... the main loop I use for ILU never calls gtk_main()
> at all. (It has its own gtk_main() where gtk_main_quit() indicates
> the level). gtk-doom probably never touches gtk_main() at all
> either.
>
> So you should at least provide an alternate method to exit out
> of GLE, if people want to use it for such programs. (And
> a way of disabling the quit_add(), if somebody wants to
> pop up a dialog and call gtk_main() in their doom-equivalent)
sure, but that are demands that the GLE side needs to take care about
(once it becomes usable ;)
> As long as the check is pretty fast though, there shouldn't
> be any harm in having the callbacks there.
if(quit_functions){} at the end of gtk_main(), that should be sufficient ;)
btw, i noticed that the gtk timeouts don't support remove_by_data, would
anyone actually need such a functionality?
(you could argue it should be there for completeness, but then i'd say the
same applies to gtk_init_remove, gtk_init_remove_by_data also and the returned
value of a gtk_init function should be honoured as well).
>
> Regards,
> Owen
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]