I have a couple of rather basic questions: It seems that gtk_image_set_from_pixbuf
generate an event but gtk_image_set_from_file
does? (see code below) I'm VERY new to GTK+ but this seems crazy or at least inconsistent. I guess I have to put some kind of event box "around' the image widget to generate an event when it changes? Have I got this wrong? Edit: I found my problem -- seems there is no need to create a new image -- removing the gtk_image_new_from_pixbuf call fixes things.
Does GTK+ automatically clean up my 'old' image widget when I call gtk_image_new_from_pixbuf
or should I destroy it before I call the function? It may be just a wrapper around my image data but I don't want to generate a memory leak.
void gui_update_output_image(IMAGE *image)
// clear any pending events
pixbuf = gdk_pixbuf_new_from_data
TRUE, 8, // has alpha (RGBA) RGB is 8 bits per channel
image->width * 4, // row stride byte count
NULL, NULL // no clean-up function
output_image = gtk_image_new_from_pixbuf(pixbuf); // <<< MY BUG IS HERE
printf("===> NO event is pending at '%s' end\n", __FUNC__);