[gtkada] Gtk.Signal vs Gtk.Handlers
Emmanuel Briot
briot at ACT-Europe.FR
Fri Feb 1 10:17:03 CET 2002
Jean-Etienne Doucet <doucet at laas.fr> writes:
> I've got a little problem: I have to install some programs
> (of mine) written with GtkAda 1.2.10 on an older installation
> which only have GtkAda 1.2.4, and there's something I can't
> see how to do it: I want to "ignore" the delete_event on a window.
>
> Using Gtk.Handlers, I write:
>
> package W_Bool_Cb is new Return_Callback(Gtk_Window_Record, Boolean);
>
> and have a callback:
>
> function Ignore (W : access Gtk_Window_Record'Class) return Boolean is
> begin
> return True;
> end Ignore;
This is indeeed the right solution, what is the exact problem here ?
You don't even need to instantiate the package yourself, you could save a
little bit of space and use the one in GtkAda.Handlers.
> With Gtk.Signal, you can't have a function as callback, so I tried
> something like:
Gtk.Signal is obsolete. It was used in the early version of GtkAda, but has
been completely replaced by Gtk.Handlers.
Emmanuel
More information about the gtkada
mailing list