On Thu, 2007-12-06 at 17:40 +0800, Binary Chen wrote:

>       while (1) {
>               sleep(1);
>               gdk_draw_image(drawing->window, gc, img, 0, 0, 0, 0, 200, 200);
>       }

you are blocking with your own loop before entering inside the gtk+ main
loop with the following call:

>       gtk_main();

if you want to wait one second before drawing onto the window, use
g_timeout_add() and call gdk_draw_image() inside the callback passed to
that function.

please, read the documentation about the GLib main loop at:

  http://library.gnome.org/devel/glib/stable/glib-The-Main-Event-Loop.html

ciao,
 Emmanuele.

-- 
Emmanuele Bassi,
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to