callback function without arguments



I have defined a callback function for "clicking" of a
button. I have not used the normal form of 

   callback(GtkWidget *widget, gpointer data).

Instead, I have used a callback without any arugments.
(See the example given below).

My question is 

"Is there anything wrong in doing so, when I do not
need to dereference the widget or the data?"

My program is working perfectly fine. I just want to
find out, if there could be some potentional problems
with my program.

My code is as under:

 void anyfunc()
 {
  g_print("Reached here.\n");
 }

 main()
{
 .............
  button = gtk_button_new_with_label("SEND");
  gtk_box_pack_start(GTK_BOX(hbox), button, TRUE,
TRUE, 10);
  gtk_signal_connect(GTK_OBJECT(button), "clicked",
                       GTK_SIGNAL_FUNC(anyfunc),
NULL);
 .........
}

shiraz

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com



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