From: Paul v. T. <pa...@lu...> - 2005-08-26 17:33:37
|
Hi, Having been able to use Ruby/GNOME2 for my job, and because of this I & a colleague ran into some issues and got some ideas. We wrote them down and I would like to post them here for discussion, discarding or TODO purposes. Gdk * Let Gdk::Event<type>.new defer to Gdk::Event.new(<type>) with the right type (e.g. Gdk::EventExpose.new -> Gtk::Event.new(Gdk::Event::Type::EXPOSE)) It isn't very Rubyish now, you have to do for example: Gdk::EventExpose.new(Gdk::Event::Type::EXPOSE) Glib2 * GLib::IOChannel#shutdown is missing, but IOChannel#close (that has been deprecated) is available. Gtk2 * Add alias '[]' for Gtk::UIManager#get_widget. * Add alias 'size_request=' for Gtk::Widget#set_size_request for symmetry. * Gtk::Dialog#run doesn't call it's own destroy when a block was a provided. I would've suspected it to be analogous with File.open (if block given, file is closed afterwords automatically, if not, you have to do it yourself) * Can't the TreeModel include Enumerable? This would make it much more Rubyish. * Raise an error for Gtk::UIManager when trying to merge /foo/bar when /foo does not exist (this might be a Gtk issue though). * Trying to retrieve the ID of a Gtk::Plug when Gtk.init has not been called leads to a segfault, try: Gtk::Plug.new.id. Note that in many more occasions I have encountered that forgetting a Gtk.init leads to a segfault. GStreamer * Add alias '>>' to Gst::Pad#link for symmetry with Gst::Element#link. (This might pose a problem though, because it is not chainable.) * Add alias [](pad) to Gst::Element#get_pad(pad) * Alias Gst::Bin#each_element to Gst::Bin#each. * Add Gst::Element.to_s. * Gst::Caps#get_structure but no Gst::Caps#structure * Some inspects of Gst::Pads are shown as #<#<Class:0x.....>>. It's a pity our time (for the job) was up, I would really have liked to contribute some stuff, but I am really too busy with a dozen of other things. I hope these ideas/suggestions are helpful for the future, if not it's no bother. :) Thanks for the great bindings, Paul -- Student @ Eindhoven | email: pa...@lu... University of Technology, The Netherlands | JID: pa...@lu... >>> Using the Power of Debian GNU/Linux <<< | GnuPG key ID: 0x50064181 |