Passing a string to a callback function
- From: Ricardo Cervera <lical-lao wanadoo es>
- To: gtk-list gnome org
- Subject: Passing a string to a callback function
- Date: Thu, 5 Feb 2004 13:02:16 +0100
Hi.
I am having problems trying to pass a string to a callback
function via g_signal_connect. Isn't that possible?
For example, in main I have something like
g_signal_connect(widget, "whateversignal", G_CALLBACK(callbackfunc),
(gchar *)"string I want to pass");
My callaback function could be
void callbackfunc(gchar *string)
{
printf("%s\n", string);
}
But it doesnt print the string I pass to it, it prints something strange
instead. What am I doing wrong?
Thanks.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]