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:
p1 - R3INT, R3OGM_GADGETDOWN, R3OGM_GADGETUP, R3OGM_GADGETSCROLL
p2 - R3OBJ *, address of the gadget
p3 - void *, current value of the gadget