question for signal handler



Hi, all:
   If I want to pass two or more widget by a signal handler, what should I do?
For example, there are a button, an text entry and a tree view, if the button
is clicked, the text of the entry and the content of the tree view will be 
refreshed. I have wrote:
   g_signal_connect(button, "clicked", G_CALLBACK(button_clicked), data);
   The problem is: how can I pass the entry and the tree view with 'data', should I create a struct to pass 
in as data? I have tried that way, but result
is unexpected:
   "invalid unclassed pointer in cast to 'GtkWidget'"

   Is there anyone who knows how to do? Thanks

   gobin lee
---------------------------------------------------------------------------------
Ãâ·ÑʹÓÃʱÉÐͨѶ¹¤¾ß http://ads.china.com/suna/link.html
ÖлªÍøÓ°Òô½»ÓÑÉçÇø"X¶¼ÊÐÍòÈËÃÔ" http://x.china.com
ÎÒ´æÔÚ£¬ÒòΪÎÒÊÇÖйúÈË£¡ÖлªÍøÐÅÌìÓÊ http://mail.china.com
ÖлªÍøÆóÒµÓÊÏ䣬ÉÌÎñ³É¹¦µÄ±êÖ¾ http://corpmail.china.com





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