Tag Archives: 图形界面开发

在GTK中,如果定时让程序去作某件事,使用g_timeout_add

转载自:http://blog.csdn.net/ustcxiangchun/archive/2009/09/01/4508086.aspx
这个例子的作用就是把当前时间显示到窗口中,即显示了一个实时时钟。
//~~~~~~~ begin of program ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#include <cairo.h>
#include <gtk/gtk.h>
#include <time.h[......]

继续阅读