Passing Multiple Arguments to a Callback
- From: Jordan Nelson <jordan pathwaynet com>
- To: gtk-list redhat com
- Subject: Passing Multiple Arguments to a Callback
- Date: Mon, 28 Sep 1998 16:13:08 -0400 (EDT)
Hello,
Is there a way to pass multiple arguments to a callback?
ie:
struct
{
char *data;
} s_foo;
...
s_foo structure;
strcpy( arg, "Test Value" );
...
gtk_signal_connect( GTK_OBJECT( object ), "clicked",
GTK_SIGNAL_FUNC( callback ), structure, arg );
...
void callback( char *structure, char *value )
{
strcpy( structure->data, value );
g_print( "%s\n", structure->data );
g_print( "%s\n", value );
}
...
Thanks,
Jordan Nelson
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]