Making Gadgets to Talk to an Application

You can fetch gadget attributes as usual, by calling R3GetAttrs() function. For example, to find out the current value of a slider, call;

    R3GetAttrs(slider, 
               R3GSLA_Level, level,
               R3TAG_END);

But how to know when the user actually plays with the slider?

This can be accomplished by asking a gadget to tell you whenever the user plays with it. This is done by calling:

    R3Do(slider, R3WGM_MAPCHANGES,
         R3WGA_MapToObj, obj,
         R3WGA_MapToMth, methodid,
         R3TAG_END);

Now when the user plays with the gadget, the object 'obj', will be called with the method 'methodid'.

The syntax of the method is as follows: