Incrementally inserting GdkPixbuf into GtkTextBuffer
- From: Ferdinand Ramirez <ramirez ferdinand yahoo com>
- To: gtk-app-devel-list gnome org
- Subject: Incrementally inserting GdkPixbuf into GtkTextBuffer
- Date: Thu, 1 Nov 2012 06:25:57 -0700 (PDT)
How do I insert an image into a GtkTextBuffer incrementally so that I can see that the image is loading
instead of having to wait for some time with no apparent activity and seeing it all at once after a time lag?
I looked at GdkPixbufLoader, but am unable to figure out how to use this.
I called gdk_pixbuf_loader_write within a while loop as and when the image array was getting data and then in
the update callback, I called gdk_pixbuf_loader_get_pixbuf followed by gtk_text_buffer_insert_pixbuf.
However, I keep getting an error that the assertion on GDK_IS_PIXBUF failed.
Note that I am able to insert a GdkPixbuf into GtkTextBuffer using gtk_text_buffer_insert_pixbuf, but this
works only if I read the image fully before creating the pixbuf.
-Ferdinand
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]