Re: How do I pass a widget pointer to a function/callback?
- From: Tristan Van Berkom <vantr touchtunes com>
- To: Jay Barnes <jaybarnes yahoo com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: How do I pass a widget pointer to a function/callback?
- Date: Wed, 28 Jan 2004 16:23:45 -0500
Jay Barnes wrote:
g_signal_connect (G_OBJECT (button), "enter",
G_CALLBACK (enter_button), (gpointer) box);
Are you sure you want to hook on to "enter" from the
GtkButtonClass or do you really want "enter-notify-event"
from GtkWidgetClass (the raw form of "enter") ?
Note also that a mixup of these event will cause a segfault
because of the different prototypes:
http://developer.gnome.org/doc/API/2.0/gtk/GtkButton.html#GtkButton-enter
http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#GtkWidget-enter-notify-event
i.e.
gtk_widget_hide(GTK_WIDGET( (GdkEventCrossing *)gdk_event ) );
is a probable segfault.
HTH,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]