Ghrrr, excuse me for the noise. I had not read correctly the docs of 
Julia's "cfunction" function. I don't need to know the parameters in 
advance, only their types and that I know. So I got it working (at least 
for a simple example).

Joaquim

> Hi,
>
> First time here and new to IUP but unconscious enough to attack a
> challenging problem.
>
> I am playing around trying to port bits of IUP to Julia and already made
> it work for a couple of examples of the examples section, but  got stuck
> in the callbacks mystery.
>
> Take the button.c example as an example
>
> It has a line that sets the callback
>
>       IupSetCallback( btn_image, "ACTION", (Icallback) btn_image_button_cb );
>
> and the beginning of the CB reads like
>
> int btn_image_button_cb( Ihandle *self, int b, int e ) {
>     /* If the left button changed its state... */
>     if( b == IUP_BUTTON1 ) {
> ...
>
> Now, the big mystery to me is where does the btn_image_button_cb()
> function gets its arguments from? Note that in the IupSetCallback() call
> there are no arguments transmitted but they managed to find their way to
> btn_image_button_cb(). And why only those three and not the all
> collection mentioned in the docs?
>
> Understanding this and finding how to set the args is crucial for the
> Julia port because there one has to declare the arguments list as well
> as their types.
> For example as in (this is a Julia line)
>
> IupSetCallback (btn_exit,   "ACTION", cfunction(btn_exit_cb,   Int, (),))
>
> which works because btn_exit_cb() can be made to work without any input
> arguments.
>
> Thanks for any help
>
> Joaquim
>
> ------------------------------------------------------------------------------
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing&  Easy Data Exploration
> http://p.sf.net/sfu/hpccsystems
> _______________________________________________
> Iup-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/iup-users
>


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to