comp.lang.ada
 help / color / mirror / Atom feed
* GtkAda callback and event
@ 2021-09-04 21:39 DrPi
  2021-09-04 22:29 ` Dmitry A. Kazakov
  0 siblings, 1 reply; 28+ messages in thread
From: DrPi @ 2021-09-04 21:39 UTC (permalink / raw)


Hi,

I use an event callback with user data.

I first declare a package :
    package Handler_Motion_Notify is new 
Gtk.Handlers.User_Return_Callback (Widget_Type => 
Gtk.Text_View.Gtk_Text_View_Record,
 
    Return_Type => Boolean,
 
    User_Type   => t_Debug_Panel);

The function callback is declared like this :
    function On_Motion_Notify (TextView : access 
Gtk.Text_View.Gtk_Text_View_Record'Class;
                               DebugPanel : t_Debug_Panel) return Boolean;

The connection is done like this :
       Handler_Motion_Notify.Connect (Widget => Panel.TextView,
                                      Name   => 
Gtk.Widget.Signal_Motion_Notify_Event,
                                      Cb     => On_Motion_Notify'Access,
                                      User_Data => t_Debug_Panel(Panel));

This works correctly. But... I need to have access to the event in the 
callback function.
How can I achieve this ?

Regards,
Nicolas

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2021-09-12 13:57 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-04 21:39 GtkAda callback and event DrPi
2021-09-04 22:29 ` Dmitry A. Kazakov
2021-09-05 13:50   ` DrPi
2021-09-05 14:48     ` Dmitry A. Kazakov
2021-09-05 14:58       ` DrPi
2021-09-05 15:04         ` DrPi
2021-09-05 15:12           ` Dmitry A. Kazakov
2021-09-05 15:20             ` DrPi
2021-09-05 15:53               ` Dmitry A. Kazakov
2021-09-05 20:49                 ` DrPi
2021-09-09  6:56                   ` Emmanuel Briot
2021-09-09  7:57                     ` DrPi
2021-09-09 18:41                       ` Jere
2021-09-09 19:58                         ` Dmitry A. Kazakov
2021-09-09 21:01                           ` Jere
2021-09-10  6:38                             ` Dmitry A. Kazakov
2021-09-10  6:56                               ` Emmanuel Briot
2021-09-10 20:42                                 ` DrPi
2021-09-10 20:58                                   ` Dmitry A. Kazakov
2021-09-11  7:38                                     ` Emmanuel Briot
2021-09-11 15:24                                     ` DrPi
2021-09-11 15:56                                       ` Dmitry A. Kazakov
2021-09-12  7:08                                       ` AdaMagica
2021-09-12  8:52                                         ` Dmitry A. Kazakov
2021-09-12 13:00                                           ` DrPi
2021-09-12 13:57                                             ` Dmitry A. Kazakov
2021-09-10 20:46                                 ` Dmitry A. Kazakov
2021-09-11  7:36                                   ` Emmanuel Briot

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