[Glade-users] Libglade



On Wed, 2009-07-22 at 13:18 +0100, Peyman wrote:
Thanks

I'm actually running into a lot of problems with GTK in C. I found it  
much cleaner in python. Can you help me with

gboolean gtk_tree_selection_get_selected (GtkTreeSelection *selection,  
GtkTreeModel **model, GtkTreeIter *iter);

what is **model? Why would I need a pointer, to a pointer, to my model?

It's just a convenience. In case you don't keep a pointer to the model
it will fill one for you, so you can access it right away without
calling gtk_tree_selection_get_tree_view() and
gtk_tree_view_get_model(). If you already have the pointer just pass
NULL there. You can also pass NULL for the iter when you only want to
check if something is selected and do not care what it is. All that is
pretty much clearly explained in the GTK docs. I do not want to be rude
or something, but sometimes the best approach is to RTFM:
http://library.gnome.org/devel/gtk/stable/GtkTreeSelection.html#gtk-tree-selection-get-selected






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