comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: GTk3 without the Gtkbuilder and Glad
Date: Fri, 10 Jun 2016 11:38:06 -0700
Date: 2016-06-10T11:38:06-07:00	[thread overview]
Message-ID: <njf1ei$kpq$1@dont-email.me> (raw)
In-Reply-To: <575b0403$0$12046$e4fe514c@news.kpn.nl>

On 06/10/2016 11:16 AM, ldries46 wrote:
> 
> I can make that routine and let it run from the menu or some error, But I cannot
> find the way to run this routine from the destroy button of the window. How
> should I do that?

The GTK3 version of Mine_Detector (created by Pascal Malaise) has the following
for the callback for the delete event:

   function When_Close (Object : access Gtk_Window_Record'Class;
                        Event  : Gdk.Event.Gdk_Event)
   return Boolean;

so presumably you'll need a callback with this specification. It's connected by

      Window_Cb.Connect (Window, "delete_event",
                         Window_Cb.To_Marshaller (When_Close'Access) );

using

   package Window_Cb is new Gtk.Handlers.Return_Callback (Gtk_Window_Record,
Boolean);

HTH

-- 
Jeff Carter
"Beyond 100,000 lines of code you
should probably be coding in Ada."
P. J. Plauger
26

  reply	other threads:[~2016-06-10 18:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-10 18:16 GTk3 without the Gtkbuilder and Glad ldries46
2016-06-10 18:38 ` Jeffrey R. Carter [this message]
     [not found]   ` <575bcceb$0$28281$e4fe514c@news.kpn.nl>
2016-06-11 17:38     ` Jeffrey R. Carter
2016-06-12  7:50       ` ldries46
2016-06-12 17:10         ` Jeffrey R. Carter
2016-06-13  7:40           ` ldries46
2016-06-13 15:50             ` Jeffrey R. Carter
2016-06-10 19:55 ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox