Re: how do you pass a struct to a callback function?
- From: Tim Wilson <td_email usa net>
- To: gtk-list redhat com
- Subject: Re: how do you pass a struct to a callback function?
- Date: Fri, 29 May 1998 00:22:18 -0500
Try this:
void function(int fd)
{
struct MyStruct *StructToPass;
<insert code>
gdk_input_add(fd, GDK_INPUT_READ, data_avail_callback, StructToPass);
}
void data_avail_callback(gpointer data, gint source, GdkInputCondition
condition)
{
struct MyStruct *PassedStruct;
PassedStruct = (MyStruct *)data;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]