Re: problems passing data via g_signal_connect
- From: Sven Neumann <sven gimp org>
- To: <olafandjasper hushmail com>
- Cc: "gtk-list" <gtk-list gnome org>
- Subject: Re: problems passing data via g_signal_connect
- Date: 04 Nov 2003 23:12:48 +0100
Hi,
<olafandjasper hushmail com> 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]