[gtkada] question when migrating to Gtkada 3.x

Rob Groen robgr at xs4all.nl
Sun Jun 16 22:16:31 CEST 2013


Hello all,

I've start migrating to Gtkada 3.x and encountered a pecularity. It 
concerns Gtk.Widget.Add_Accelerator.
In the migration guide in Ch14 of the UG nothing is mentioned about a 
change to Add_Accelerator.
However, In Gtkada 2.x it is declared as:
    procedure Add_Accelerator
      (Widget       : access Gtk_Widget_Record;
       Accel_Signal : Glib.Signal_Name;
       Accel_Group  : Gtk.Accel_Group.Gtk_Accel_Group;
       Accel_Key    : Gdk.Types.Gdk_Key_Type;
       Accel_Mods   : Gdk.Types.Gdk_Modifier_Type;
       Accel_Flags  : Gtk.Accel_Group.Gtk_Accel_Flags);

In Gtkada 3.x it is declared as:
    procedure Add_Accelerator
       (Widget       : not null access Gtk_Widget_Record;
        Accel_Signal : UTF8_String;
        Accel_Group  : not null access 
Gtk.Accel_Group.Gtk_Accel_Group_Record'Class;
        Accel_Key    : Gtk.Accel_Group.Gtk_Accel_Key;
        Accel_Mods   : Gdk.Types.Gdk_Modifier_Type;
        Accel_Flags  : Gtk.Accel_Group.Gtk_Accel_Flags);
where Gtk.Accel_Group.Gtk_Accel_Key is
    type Gtk_Accel_Key is record
       Accel_Key : Gdk.Types.Gdk_Key_Type;
       Accel_Mods : Gdk.Types.Gdk_Modifier_Type;
       Accel_Flags : Gtk_Accel_Flags;
    end record;

Now this seems strange to, as Accel_Mods and Accel_Flags seem to be 
doubled in the record declaration
and in the Add_Accelerator formal params. Is this correct? If not what 
is correct?
Are there other known pecularities?

Best regards
Rob Groen


More information about the gtkada mailing list