Thanks,
Milind

On Sat, Jul 11, 2015 at 7:37 AM, Antonio Scuri <sc...@tecgraf.puc-rio.br>
wrote:

>   BTW, all the callbacks are type-defined in "iupcbs.h". So actually all
> you have to do is:
>
> #include <iupcbs.h>
> ....
>
> cb = (IFnii)IupGetCallBack(...);
>
>   for the resize_cb
>
> Best,
> Scuri
>
>
> On Sat, Jul 11, 2015 at 11:33 AM, Milind Gupta <milind.gu...@gmail.com>
> wrote:
>
>> I figured out. Thanks for leading me in the right direction. I did:
>>
>> typedef int (*reszcb)(Ihandle*,int,int);
>>
>> and then
>> reszcb cb;
>> cb = (reszcb)IupGetCallBack(...);
>>
>> On Sat, Jul 11, 2015 at 6:50 AM, Milind Gupta <milind.gu...@gmail.com>
>> wrote:
>>
>>> Hi Mihail,
>>>      Thanks for your reply.
>>> On Jul 11, 2015 1:51 AM, "Mihail Ivanchev" <mihai...@gmail.com> wrote:
>>> >
>>> > Hi Milind,
>>> >
>>> > looking at the definition of Icallback in iup.h:
>>> >
>>> > typedef int (*Icallback)(Ihandle*);
>>> >
>>> > you can just call a callback you receive from iupGetCallback through
>>> myCallback(someHandle)
>>>
>>> I tried this and because I was trying to pass additional arguments the
>>> compiler complains.
>>>
>>> In practice, however, other (similar) function types are also cast to
>>> Icallback. They mostly have a different number of parameters. For instance
>>> the callback of a canvas for the RESIZE_CB has the structure:
>>> >
>>> > int function(Ihandle *ih, int width, int height);
>>> >
>>> > Therefore it might be a bad idea to invoke a callback function in this
>>> way. You will need to consider what type of event this callback was
>>> installed for.
>>>
>>> So if I had to call the resize call back how would I pass in the width
>>> and height arguments?
>>>
>>> Thanks,
>>> Milind
>>>
>>> >
>>> > Regards
>>> > Mihail
>>> >
>>> >
>>> > On 7/11/2015 08:14, Milind Gupta wrote:
>>> >>
>>> >> How can I call a function I receive from iupGetCallBack i.e. function
>>> of the type Icallback?
>>> >>
>>> >>
>>> >>
>>> ------------------------------------------------------------------------------
>>> >> Don't Limit Your Business. Reach for the Cloud.
>>> >> GigeNET's Cloud Solutions provide you with the tools and support that
>>> >> you need to offload your IT needs and focus on growing your business.
>>> >> Configured For All Businesses. Start Your Cloud Today.
>>> >> https://www.gigenetcloud.com/
>>> >>
>>> >>
>>> >>
>>> >> _______________________________________________
>>> >> Iup-users mailing list
>>> >> Iup-users@lists.sourceforge.net
>>> >> https://lists.sourceforge.net/lists/listinfo/iup-users
>>> >
>>> >
>>> >
>>> >
>>> ------------------------------------------------------------------------------
>>> > Don't Limit Your Business. Reach for the Cloud.
>>> > GigeNET's Cloud Solutions provide you with the tools and support that
>>> > you need to offload your IT needs and focus on growing your business.
>>> > Configured For All Businesses. Start Your Cloud Today.
>>> > https://www.gigenetcloud.com/
>>> > _______________________________________________
>>> > Iup-users mailing list
>>> > Iup-users@lists.sourceforge.net
>>> > https://lists.sourceforge.net/lists/listinfo/iup-users
>>> >
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Don't Limit Your Business. Reach for the Cloud.
>> GigeNET's Cloud Solutions provide you with the tools and support that
>> you need to offload your IT needs and focus on growing your business.
>> Configured For All Businesses. Start Your Cloud Today.
>> https://www.gigenetcloud.com/
>> _______________________________________________
>> Iup-users mailing list
>> Iup-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/iup-users
>>
>>
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Iup-users mailing list
> Iup-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
>
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to