Re: g_signal_connect ?



On Wed, 31 Mar 2004, ionut grigorescu wrote:
I don't want to waste anybody's time so here's my
question :
When a button get's pressed I use g_signal_connect to
use a callback function, but I can only submit one
parameter to that callback functio.How can I send two
ore more parameters to that function ?
Hello ionut!
Have you searched the list archive for this topic? You are at least the
third person asking this question in the last few weeks.
Anyway, here is the answer:
Create a structure with all the parameters you need and pass a pointer to
this structure as user_data to g_signal_connect. Inside your callback use
the pointer to access the members of your structure.

Regards,
                       Peter
-- 
====================================================================
Peter Krüger

applied software solutions (appss) GmbH
Sandtorstr. 23
D-39106 Magdeburg
Germany

Phone:  +49-(0)391-54486-19388
Fax:    +49-(0)391-54486-19222
email:  krueger appss de
URL:    http://www.appss.de

Managing Director: Uwe Hess, Dietmar Schäfer
Register: HRB12386, AG Mageburg

"Virtual business becomes reality!"

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. Any
unauthorised copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
====================================================================




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