newbie: on the form of callbacks...
- From: Cevat Ustun <ustun Glue umd edu>
- To: gtk-app-devel-list gnome org
- Subject: newbie: on the form of callbacks...
- Date: Thu, 22 Feb 2001 00:58:50 -0500 (EST)
Below are two snippets taken from the "Upgraded hello world"
example in the tutorials. My question is: the function
"callback" is called with _one_ argument; a pointer to "button 1",
whereas the callback function itself has _two_ arguments...
What's going on?
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (callback),
(gpointer) "button 1");
void callback( GtkWidget *widget,
gpointer data )
{
g_print ("Hello again - %s was pressed\n", (char *) data);
}
Thanks for any help,
Cevat Ustun
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]