Hi, I've tried to port some Gtkmm example to vala and after I changed the vapi it works (see attachment). May be its wrong.
Thanks for response. I will think about it. Regards Uwe 2009/5/29 Frederik <[email protected]> > Uwe Strempel wrote: > > Hi, > > I've found another one in gtk+-2.0.vapi. > > class Container > > following is wrong > > public virtual void forall (Gtk.Callback callback, void* > callback_data); > > > > should be > > public virtual void forall (bool include_internals, Gtk.Callback > > callback); > > Hi Uwe, > > there was a bug regarding this issue: > > http://bugzilla.gnome.org/show_bug.cgi?id=543872 > > You can use now: > > forall_internal (bool include_internals, Gtk.Callback callback); > > > In class Widget. > > I' think > > size_allocate is wrong > > before: > > > > public virtual signal void size_allocate (Gtk.Allocation > allocation); > > > > after change: > > public virtual signal void size_allocate (ref Gtk.Allocation > > allocation); > > > > I don't know if signal works with ref, but the vala compiler creates > > const GtkAllocation * instead GtkAllocation. > > The type is Gdk.Rectangle, not Gtk.Allocation - I'm not sure why. > I don't think that 'allocation' should be a 'ref' argument. In contrast > to 'requisition' in 'size_request()' it is not meant to be changed by > the method. GTK+ doesn't consequently use const struct pointers for > arguments where it actually should do. The Vala way is better but it > produces a "discards qualifiers from pointer target type" gcc warning > when overriding this method. > > > Best Regards, > > Frederik > > _______________________________________________ > Vala-list mailing list > [email protected] > http://mail.gnome.org/mailman/listinfo/vala-list >
ExampleWindow.vala
Description: Binary data
MyContainer.vala
Description: Binary data
_______________________________________________ Vala-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/vala-list
