#include <gtk/gtk.h>

static gboolean timeout_cb(gpointer user_data)
{
    GtkWidget *w = user_data;
    
    static char buf[2] = "0";
    gtk_widget_set_tooltip_markup(w, buf);
    buf[0]++;

    return TRUE;
}

int main(int argc, char **argv)
{
    gtk_init(&argc, &argv);
    
    GtkWidget *toplevel = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    gtk_widget_show(toplevel);
    
    g_timeout_add(1000, timeout_cb, toplevel);
    
    gtk_main();
    
    return 0;
}
