Re: Example in Docs: GPOINTER_TO_INT
- From: Owen Taylor <otaylor redhat com>
- To: Brooklyn Linux Solutions <ruben mrbrklyn com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Example in Docs: GPOINTER_TO_INT
- Date: 31 May 2001 00:05:10 -0400
Brooklyn Linux Solutions <ruben mrbrklyn com> writes:
Greeting
What is GPOINTER_TO_INT in the example at:
http://developer.gnome.org/doc/API/gtk/gtk-signals.html#GTK-SIGNAL-CONNECT
______________________________________________________________________________
static void button_clicked_int(GtkButton* button, gpointer func_data)
{
g_print("button pressed: d\n", GPOINTER_TO_INT(func_data));
}
/* By calling this function, you will make the g_print above
* execute, printing the number passed as `to_print'. */
static void attach_print_signal(GtkButton* button, gint to_print)
{
gtk_signal_connect(GTK_OBJECT(button), "clicked",
GTK_SIGNAL_FUNC(button_clicked_int),
GINT_TO_POINTER(to_print));
}
_______________________________________________________________________________
I tried to find it in the online docs. I looked under glib and came up
blank.
I would recommend removing it from the example.
http://developer.gnome.org/doc/API/glib/glib-type-conversion-macros.html
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]