g_timeout_add() - Passing Multiple Parameters!



Hi there,
I'm new at GTK+ and I'm trying to impruve my GTK+ app.

I'm using g_timeout_add() funtion to call a function to read an int value from a text file. I want to put that interger on a widget located in my GUI main window.
I using this funtion as:

timer = g_timeout_add(1000, (GtkFunction)ReadTimerFile, (gpointer)"database.txt");

Where "database.txt" is the file to be read.

Question: How can I pass more than one argument to my ReadTimerFile funtion???

PS: I need to pass and pointer to a widget and the file path, ie, (gpointer)"database.txt" and (gpointer)widget.

Thanks in Advance!



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