On Tue, 2013-02-19 at 10:31 +0000, Torsten Schoenfeld wrote:
> On 19.02.2013 05:34, Dan Kasak wrote:
> > More Gtk2 ==> Gtk3 questions ...
> >
> > When I do $tree_selection->get_selected_rows, I get an array, which
> > appears to have:
> >
> > - row[0]: an array of Gtk3::TreePath objects
> > - row[1]: the model ( in my case, a Gtk3::ListStore )
> >
> > Is this expected?
> 
> Yes.  Gtk2 does this differently, but I saw no compelling reason to 
> uphold this inconsistency with the C API.  This particular change is 
> listed in the pod: 
> <https://metacpan.org/module/Gtk3#Porting-from-Gtk2-to-Gtk3>.

Ah. I had somehow not stumbled across this page yet. Thanks.

> > http://developer.gnome.org/gtk3/3.0/GtkTreeSelection.html#gtk-tree-selection-get-selected-rows
> >
> > don't say anything about getting the model back.
> 
> C functions can only have one return value; to return more than one 
> value, they must use "out" arguments, i.e. reference arguments that get 
> set by the function.  "GtkTreeModel **model" is such an argument in this 
> case.  These kinds of "out" arguments are mapped to normal return values 
> by Glib::Object::Introspection (and hence by Gtk3).

Makes sense :)

Thanks for the explanation.

Dan

_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list

Reply via email to