[gtkada] Gtk.Signal vs Gtk.Handlers

Jean-Etienne Doucet doucet at laas.fr
Fri Feb 1 09:26:51 CET 2002


Bonjour,

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;

With Gtk.Signal, you can't have a function as callback, so I tried
something like:

  procedure Ignore (W : access Gtk_Window_Record) is
  begin
    Emit_Stop_By_Name (W, "delete_event");
  end Ignore;

but this doesn't seem to work: the window still disappears...

What is it that I missed ?

Thanks in advance for any help.

--jed--




More information about the gtkada mailing list