I'm glad to see James incorporated the gist of my signal- and property-
listing patches into the latest CVS version of the pygtk2 code. I agree my
code was in need of some tuning, but I'm a little confused about the names
and relationship between the pygtk2 functions and their Gtk C API
counterparts. While it might be nice to have a little higher-level function
(the new gobject.signal_list_names vs. the combination of
gobject.signal_name and gobject.signal_list_ids I implemented), someone will
pay a cost documenting them. Since "g_signal_list_names" is not a function
in the Gtk/Gobject API, "gobject.signal_list_names" will have to be
documented. I believe the same holds for the TreeModel API in pygtk2. (It
seems not to mimic the Gtk C API very closely.)
If the Gtk C API is matched as closely as possible the documentation issue
can be finessed to a great degree by simply pointing people at existing Gtk
reference documentation (which, I assume, will improve over time) and
writing a fairly simple mapping manual that explains the conventions used in
the wrappers (e.g. "Functions named 'g_<whatever>' are exposed as
'gobject.<whatever>'"). On the other hand, where I veered off this path by
wrapping Gtk's g_object_class_list_properties function as simply
"gobject.list_properties", James changed it back to
"object_class_list_properties", a name that (to me, anyway) is both a
mouthful and seems obtuse (what does the "object_class" part of the name
mean - why not just "object" or "class" or nothing?). Mapping consistency
is especially important with Gtk because it's such a large API. Nobody is
going to want to duplicate the documentation for even 5% Gtk API.
The automagic wrapper stuff based on the gtk.defs file is going to be an
extremely uniform (and very thin) wrapper around the C API. I think it
would be beneficial if the stuff that must be done manually tried to be as
consistent.
--
Skip Montanaro ([EMAIL PROTECTED])
(847)971-7098
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk