Re: variables in g_signal_connect
- From: Christopher Anderson <sidewinder asu gmail com>
- To: Gyözö Both <gyboth bygfoot com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: variables in g_signal_connect
- Date: Tue, 19 Jul 2005 09:45:53 -0700
Jeez, the question is answered already!
Chris
On 7/14/05, Gyözö Both <gyboth bygfoot com> wrote:
use GINT_TO_POINTER:
Horizontal_Zoom_In_clicked(GtkWidget *widget, gpointer gt)
g_signal_connect ((gpointer) Horizontal_Zoom_In, "clicked",
G_CALLBACK
(Horizontal_Zoom_In_clicked), GINT_TO_POINTER(graph_type));
and GPOINTER_TO_INT(gt) in the callback to get the int value from the
pointer.
see also
http://developer.gnome.org/doc/API/2.0/glib/glib-Type-Conversion-Macros.html
gyozo
--
When you're not looking at it, this fortune is written in FORTRAN.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]