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

Perl data format for create_from_data



Hi,
   I am writing an application in Gtk-Perl-0.3 in which I would like to
refresh a pixmap with images taken from a camera using a C routine.  For
now, I just have the C program printf the data as characters and I use
backquotes in Perl to grab the image as a big string.  I am trying to use
Gtk::Gdk::Pixmap->create_from_data to create a new pixmap.  The calling
sequence is listed in Gtk.xs as:
	
Gtk::Gdk::Pixmap
create_from_data(Class, window, data, width, height, depth, fg, bg)
        SV *    Class
        Gtk::Gdk::Window        window
        SV *    data
        int     width
        int     height
        int     depth
        Gtk::Gdk::Color fg
        Gtk::Gdk::Color bg
        RETVAL = gdk_pixmap_create_from_data(window, SvPV(data,na), width,
height, depth, fg, bg);

I'm not sure what is wants for data though.  I have played with passing it
the string directly and lists, but always get the error:
Gdk-ERROR **: BadValue (integer parameter out of range for operation)
  serial 421 error_code 2 request_code 53 minor_code 0

Does anybody know what format I should pass the data in?  If anyone has
(Perl/Gtk) code in which they've used this, I would love to see it.

TIA,

Dan 




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