Re: problems passing data via g_signal_connect

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

 



Hi,

<olafandjasper@xxxxxxxxxxxx> writes:

> g_signal_connect(G_OBJECT (tableCells[r][6]), 
>                  "button_press_event", 
>                  G_CALLBACK (selectActionBin),  
>                  (gpointer) &mydata); 
> 
> 3. The callback function 
> void selectActionBin(MY_DATA *data) 

The correct callback function for this signal would have the following
signature:

void selectActionBin (GtkWidget      *widget,
                      GdkEventButton *event,
                      MY_DATA        *data)

If you want to use the callback as you wrote it, you could use
g_signal_connect_swapped() which will cause the widget and data
pointers to be swapped.


Sven
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux