GNOME Bugzilla – Bug 420946
interfacing Gtk2::FileChooser
Last modified: 2007-03-21 19:09:23 UTC
package Gtk2::Ex::::RecycleButton; use strict; use warnings; use Gtk2; use Glib::Object::Subclass Gtk2::Button::, interfaces => [ Gtk2::FileChooser:: ], ; 1; __END__ running the code above, i get the following error Can't locate object method "_ADD_INTERFACE" via package "Gtk2::FileChooser" at /usr/local/lib/perl/5.8.8/Glib.pm line 211. BEGIN failed--compilation aborted at /home/holger/perl/Gtk2/Ex/RecycleButton.pm line 9.
GtkFileChooser is not a public interface in GTK+, so you can't implement it in the perl bindings.
Holger: to see what Emmanuele means, take a look at gtk+'s gtkfilechooser.h. It contains: typedef struct _GtkFileChooser GtkFileChooser; and that's all we no about the GtkFileChooser interface. In contrast, take a look at gtkcelleditable.h: struct _GtkCellEditableIface { GTypeInterface g_iface; /* signals */ void (* editing_done) (GtkCellEditable *cell_editable); void (* remove_widget) (GtkCellEditable *cell_editable); /* virtual table */ void (* start_editing) (GtkCellEditable *cell_editable, GdkEvent *event); }; In this case, we know which virtual methods exist. In short: GtkCellEdtiable is a public interface whereas GtkFileChooser isn't.