Example in Docs: GPOINTER_TO_INT



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.

It doesn't seem to add to the illumination of the gtk_signal_connect
function,
and is not redily indexed in the documents.

Ruben
   
-- 
Brooklyn Linux Solutions
http://www.mrbrklyn.com
http://www.brooklynonline.com

1-718-382-5752




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]