Passing Multiple Arguments to a Callback



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]