[Contents] [index] [Help] [Retrace] [browse <] [Browse >]

This method tells the active gadget to become inactive.  The return value
for this method is not explicitly defined.

GM_GOINACTIVE uses a custom message structure (defined in
<intuition/gadgetclass.h>):

    struct gpGoInactive
    {
        ULONG             MethodID;    /* GM_GOINACTIVE */
        struct GadgetInfo *gpgi_GInfo;

    /* V37 field only!  DO NOT attempt to read under V36! */
        ULONG             gpgi_Abort; /* gpgi_Abort=1 if gadget was    */
                                      /* aborted by Intuition and 0 if */
                                      /* gadget went inactive at its   */
                                      /* own request.                  */
    };

The gpgi_Abort field contains either a 0 or 1.  If it is 0, the gadget
became inactive at its own request (because the gm_handleinput method
returned something besides gmr_meactive).  if gpgi_abort is 1, intuition
aborted this active gadget.  Some cases where Intuition aborts a gadget
include: the user clicked in another window or screen, an application
removed the active gadget with removeglist(), and an application called
activatewindow() on a window other than the gadget's window.

If the gadget allocated any resources to cache or precalculate information
in the gm_goactive method, it should deallocate those resources in this
method.