Re: g_signal_connect



On Thu, 2004-04-01 at 09:33, ionut grigorescu wrote:
How can I submit more than one parameter to tha
callback function using g_signal_connect?
Is there other function that does this ?
Thank you !!! 

Use a struct, for example to pass two integers:

typedef struct _dimensions dimensions;
struct _dimensions {
        gint height;
        gint weight;
};

....

GtkWidget *button;
dimensions *size;

....

g_signal_connect (G_OBJECT(button), "clicked", G_CALLBACK(button_cb), size);

Keith.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]