Re: display images continiously!

First off, I'd create a buffer GdkPixmap  or a GdkRGB buffer.  Then on
then on the expose event for your GtkDrawingArea, I'd write the buffer
to the screen (the drawing area's window).  I'd set the configure event
callback for the GtkDrawingArea to manage the buffer and resize it if
needed when the window changes size, etc.  Then in your timeout callback
that gets called every second (gtk_widget_add_timeout), write to the
buffer and then call gtk_widget_draw(), which will synthesize an expose

Basically if you use this double-buffering scheme, then you don't have
to do anything special when the window is uncovered and asked to repaint
itself.  You just copy the buffer onto the DrawingArea on an expose
event.  All changes can be to the buffer which will be displayed by the
expose handler (which can be triggered by gtk_widget_draw and


On Sat, 2002-08-03 at 07:39, simith nambiar wrote:
> hi list,
>            i managed to open and display an image
> using GtkImage with help from the list though!
> i wanted to do that adding a timeout every 1 second 
> so i add an event expose and how do i write the expose
> code ?
> i want to do something like this every 1 second on
> expose event called i just want to open a new image
> and display it , but nothing happenning for me !
> regards,
> simith
> =====
> <P><A href="";></A>
> <P><A href="";></A>&nbsp;</P>
> ________________________________________________________________________
> Want to sell your car? advertise on Yahoo Autos Classifieds. It's Free!!
>        visit
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
Public key available from

Attachment: signature.asc
Description: This is a digitally signed message part

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