Re: [Vala] Overriding Gtk.Container.forall (...)
- From: Yu Feng <rainwoodman gmail com>
- To: Frederik <scumm_fredo gmx net>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Overriding Gtk.Container.forall (...)
- Date: Thu, 17 Jul 2008 19:53:20 -0400
Hi Frederik,
I am sure I understand why the two foralls have different signatures,
but I don't know how to deal with it.
the virtual forall in class has a definition with gtk_container_forall,
gtk_container_forall is loop over all the children (including the
internal children), it invokes
class->forall with the parameter including_internals = TRUE;
To make it clear, gtk_container_foreach has to be mentioned.
gtk_container_foreach invokes
class->forall with including_internals = FALSE.
I think vala's vapi generator is screwed by this strange situation:
the virtual class->forall is ignored.
I don't see any solution to the problem within the vala framework. Any
ideas?
Yu
On Thu, 2008-07-17 at 20:45 +0200, Frederik wrote:
Hi,
I'm trying to override the 'forall' function of a Gtk.Container.
The signature in the vapi is:
void forall (Gtk.Callback callback, void* callback_data);
but it should be:
void forall (bool include_internals, Gtk.Callback callback);
I can hide the 'callback_data' parameter by adding this line to the
'gtk+-2.0.metadata' file:
gtk_container_forall.callback_data hidden="1"
But how can i get the 'include_internals' parameter into the vapi
definition? Strangely, there are two different method signatures for
'forall' in the 'gtk/gtkcontainer.h' header file:
void (*forall) (GtkContainer *container,
gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
and
void gtk_container_forall (GtkContainer *container,
GtkCallback callback,
gpointer callback_data);
Why does the virtual method definition have a different signature and
how can I get vapigen to generate the correct definition?
Regards,
Frederik
_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]