Re: Return values from gtk2 widget (void) methods

Daniel Lacroix <dlacroix erasme org> writes:

I do share this point of view. I prefer a Gtk2-Perl implementation which
stick to the C libraries. That way I can use the C doc to write my Perl
program. Else, a Gtk2-Perl documentation will be a necessity. I know
that the Gtk-Perl version was not always doing that but I thing it was a
mistake (because no doc was given). The only exception is multiple
returned values. When pointer on data are given in C, we should
translate that in multiple returned values and no pointer on data.

And we should not forget to keep the same ordering of data. For
example, in gtk-perl, Gtk::Gdk::Drawable::get_size returned
($height, $width) whereas pointers were passed to the C function
in the opposite order. As for get_size, I've fixed it to have the
same ordering.

Also, probably we could make use of 'wantarray' to give back an
array or an arrayref, since this is virtually gratuitous for us.

Guillaume Cottenceau -

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]