Re: [gtk-list] signal/slot question
- From: Tero Pulkkinen <terop students cc tut fi>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] signal/slot question
- Date: 03 Mar 1998 19:57:30 +0200
Robert Wilhelm <robert@physiol.med.tu-muenchen.de> writes:
> Doing a gtk_signal_connect(), the data (last argument) does not reach
> the callback function.
>
> What I am doing wrong here?
>
> Robert
>
> #include <gtk/gtk.h>
>
> static void cb(GtkWidget* widget, gpointer data)
> {
> printf("cb %p %p %p\n",widget,data, *(void **) data);
> }
All *_event signals take one argument, your callback only has one argument cept
the widget... You should have 3 args in the callback.
> gtk_signal_connect(GTK_OBJECT(window),"button_press_event",GTK_SIGNAL_FUNC(cb),window);
> gtk_signal_connect(GTK_OBJECT(window),"button_release_event",GTK_SIGNAL_FUNC(cb),NULL);
--
-- Tero Pulkkinen -- terop@modeemi.cs.tut.fi --
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]