Re: [gtk-list] the mysterious pointer error
- From: Paolo Molaro <lupus lettere unipd it>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] the mysterious pointer error
- Date: Mon, 2 Aug 1999 19:36:29 +0200
On Mon, Aug 02, 1999 at 03:55:39PM +0000, Willem Robert van Hage wrote:
> the problem's somewhere in xfuncs.c and gamec.c,
> in xfuncs.c there's the function "void init_widgets(GameControl**
> gamec);", and in that function
> "gtk_signal_connect(GTK_OBJECT(MAP_WINDOW),"key_press_event",GTK_SIGNAL_FUNC(key_interface),gamec);"
> that means gamec is a GameControl**... in gamec.c the function "void
> key_interface(GameControl** gamec,GdkEventKey* event);"
key_interface() will be called with the object as first argument, while
the user_data pointer will come last, so it needs to have the signature:
int
key_interface(GtkWidget *widget, GdkKeyEvent* event, gpointer data) {
GameControl ** gamec = (GameControl**)data;
....
}
lupus
--
-----------------------------------------------------------------
lupus@debian.org debian/rules
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]