Re: [Vala] Allowable to add user data to callback?



On Sat, Aug 20, 2011 at 2:56 PM, Luca Bruno <lethalman88 gmail com> wrote:

https://live.gnome.org/Vala/FAQ#How_do_I_pass_user_data_to_a_callback.3F

--
http://www.debian.org - The Universal Operating System


Thanks for the quick response.  I feel fairly thick because I don't
understand how the snippets in the FAQ can apply.  They seem to assume
some knowledge that I don't have.

if these are the signatures:
delegate void SampleCB(Object o);
set_sample_callback(SampleCb? cb=null);

how would I add a user data element such as?
void sample_cb(Object o, void* userdata) {...}
int my_data = 0;
set_sample_callback(the_object, &my_data);

Thanks for the help.
-- 
Regards,
-Brian



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