Hello, I have tried to create Perl/Gtk bindings for the Widget GtkImageViewer that I have created. Here is a synopsis of what I did: * Added the following line to pkg.defs : (define-object GtkImageViewer (GtkWidget) (cast GTK_IMAGE_VIEWER)) * Created Makefile.PL based on other Makefile.PL's . * Created a file xs/GtkImageViewer.xs based on other files that among other things contains the following declaration: Gtk::ImageViewer_Sink gtk_image_viewer_new (Class, image) SV *Class Gtk::Gdk::Pixbuf image CODE: RETVAL = GTK_IMAGE_VIEWER(gtk_image_viewer_new (image)); OUTPUT: RETVAL * Created a test.pl file that contains the following line: $image = Gtk::ImageViewer->new($pixbuf); Everything compiles just fine, but when I try to run the test program it dies with the error: unable to convert GtkObject 0x1f7328 of type 44565 (GtkImageViewer) into a Perl/Gtk type at ./test.pl line 30. What went wrong? I'm attaching the archive that contains all the changes that I did for GtkImageViewer . Note that I had to change Makefile.PL for GdkPixBuf in order to get it to compile.
Attachment:
GtkImageViewer-Perl.tgz
Description: Binary data