[Q] How many arguments can I use in GTK_SIGNAL_FUNC



Hi all~

Examaple 1)

gtk_signal_connect(GTK_OBJECT(clist), "select_row",
                       GTK_SIGNAL_FUNC(selection_made),
                       NULL);

void selection_made( GtkWidget      *clist,
                     gint            row,
                     gint            column,
                     GdkEventButton *event,
                     gpointer        data )
{
  .
  .
}

selection_made function have 5 arguments.
but gtk_signal_connect function's last arguments is NULL.

Example 2)

gtk_signal_connect (GTK_OBJECT (button), "clicked",
                        GTK_SIGNAL_FUNC (callback), (gpointer) "cool
button");


void callback( GtkWidget *widget,
               gpointer   data )
{
    g_print ("Hello again - %s was pressed\n", (char *) data);
}

callback function have 2 arguments.
and gtk_signal_func's last arguments is strings.

in this case, I want to know How many arguments can I use in callback
fuction.
and What arguments can I use?

Thank you...






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