Re: Passing an array of (GtkWidget *) to a callback function



You only have to pass a pointer on the array:

void clicked_callback(GtkWidget *b, GtkWidget **a)
{
  /* here all wodgets are available with a[n] */
}

....

  GtkWidget **array;

  array = g_new(GtkWidget *,5);
  for (i = 0; i < 5; i++)
    array[i] = ...
  gtk_signal_connect(GTK_OBJECT(ok), "clicked",
    GTK_SIGNAL_FUNC(clicked_callback), array);





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