RE: gtk_timeout_add



Title: RE: gtk_timeout_add

Your handler GetAlarms must be a GtkFunction, which means that it must return a gint value.
The handler will be called repeatedly until it returns FALSE.

--
Jérôme Mainaud
Klee
jmainaud klee fr
+ 33 146 295 825


-----Message d'origine-----
De : Ian Frawley [mailto:ifrawley opaltelecom co uk]
Envoyé : lundi 18 juin 2001 16:31
À : gtk-app-devel-list gnome org
Objet : Re: gtk_timeout_add


Right I have got it to compile with:

GtkWidget * Alarmlist = gtk_list_new;

gtk_timeout_add(10, GtkFunction ( GetAlarms ), Alarmlist);


void GetAlarms(GtkWidget * button, gpointer data)
{

    GtkWidget * listitem = gtk_list_item_new_with_label ( "AAARRGG I AM ON FIRE" );
    gtk_container_add ( GTK_CONTAINER ( data ), listitem );
    gtk_widget_show ( listitem );

}

but when it runs I get a sementation fault can anyone help ;-(

Thanks

Ian Frawley
Software Engineer
Opal Telecom
Tel: 0161 222 2122
E-Mail: ifrawley opaltelecom co uk



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