[gtkada] GDK 2.2.0 and Event Handling

Preben Randhol randhol at pvv.org
Wed Jul 9 10:39:10 CEST 2003


Chris Sparks <mrada at catalina-inter.net> wrote on 09/07/2003 (09:24) :
> Does anyone have any idea why when I set the "All Events" Mask for a
> window that I don't get the Expose, Enter_Notify, Leave_Notify events?

Works for me with the Klokka program. Note I had to change it a bit to
get it to compile woth 2.2.0, but I only do:


  Event_Cb.Connect
      (Gtk_Widget (Window.Drawing_Area),
       "expose_event",
       Event_Cb.To_Marshaller (On_Window_Expose_Event'Access));

where Event_Cb is:

   package Event_Cb is new Gtk.Handlers.Return_Callback
     (Widget_Type => Gtk_Widget_Record,
      Return_Type => Boolean);

and On_Window_Expose_Event:

   function On_Window_Expose_Event
     (Object : access Gtk_Widget_Record'Class;
      Event  : Gdk.Event.Gdk_Event) return Boolean
   is
   begin
      Klokka_Gui.Draw_Clock;
      return True;
   end On_Window_Expose_Event;

> This is driving me mad since I can't find any FAQ on the changes to
> GDK from the GTK website.

Which OS?

--
Preben Randhol -------------- http://www.pvv.org/~randhol/Ada95 --
                 «For me, Ada95 puts back the joy in programming.»



More information about the gtkada mailing list