RE: variables in g_signal_connect
- From: Gyözö Both <gyboth bygfoot com>
- To: gtk-app-devel-list gnome org, Michal Porzuczek <mporzuczek gmail com>
- Cc:
- Subject: RE: variables in g_signal_connect
- Date: Thu, 14 Jul 2005 19:24:46 +0200
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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]