Gtk2 - Callback-Funktion mehrere Argumente übergeben
-
Hallo, ich arbeite mich gerade in Gtk2 ein, und habe eine Anfängerfrage:
Im Gtk+2.0-Tutorial wird der Callbackhandler so erklärt:
To make a button perform an action, we set up a signal handler to catch these signals and call the appropriate function. This is done by using a function such as:
gulong g_signal_connect( gpointer *object,
const gchar *name,
GCallback func,
gpointer func_data );where the first argument is the widget which will be emitting the signal, and the second the name of the signal you wish to catch. The third is the function you wish to be called when it is caught, and the fourth, the data you wish to have passed to this function.
gpointer func_data ist ja nur ein Null-Zeiger auf ein Funktionsargument. Wie übergebe ich der Funktion mehrere Argumente? Ist das möglich?
Vielen Dank für Antworten.
Grüße
-
Habe das Problem auf andere Art gelöst:
Alle Variablen, die die Funktion braucht, in einer Struktur zusammengefasst und als Zeiger übergeben.