[Glade-users] User defined structs to callback



Hi listers,

I can I use a user defined struct and pass it to a callback function from a=
=20
window created by glade?

Example:

typedef struct my_struct{
        int a;
        int b;
}My_struct;

/* Stuff created by glade */
GtkWidget *create_window(){
        /* Widgets  bla bla ... /*

        /* button is a GtkButton */
        g_signal_connect ((gpointer) button,"clicked",G_CALLBACK(callback_func),=20
my_struct);
}

Where should I declare and initialize My_struct?=20

=2D-=20
Miguel Figueiredo
IT student / Marine Biologist
"Tem calma irm=E3o que a morte n=E3o precisa do teu sim, =E9 coisa certa, m=
ais vale=20
fazer da vida um festim." ALC





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