2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 #include "intuition_intern.h"
8 #include <intuition/gadgetclass.h>
10 /*****************************************************************************
13 #include <intuition/intuition.h>
14 #include <proto/intuition.h>
16 AROS_LH3(void, OnGadget
,
19 AROS_LHA(struct Gadget
*, gadget
, A0
),
20 AROS_LHA(struct Window
*, window
, A1
),
21 AROS_LHA(struct Requester
*, requester
, A2
),
24 struct IntuitionBase
*, IntuitionBase
, 31, Intuition
)
27 Enable a gadget. It will appear normal.
30 gadget - The gadget to deactivate
31 window - The window, the gadget is in
32 requester - The requester, the gadget is in or NULL if the
33 gadget is in no requester
39 This function will update the gadget (unlike the original function
40 which would update all gadgets in the window).
50 *****************************************************************************/
54 DEBUG_ONGADGET(dprintf("OnGadget: gadget 0x%lx window 0x%lx req 0x%lx\n",
55 gadget
, window
, requester
));
60 if ((gadget
->GadgetType
& GTYP_GTYPEMASK
) == GTYP_CUSTOMGADGET
)
62 struct TagItem set_tags
[] =
64 {GA_Disabled
, FALSE
},
68 SetGadgetAttrsA(gadget
, window
, requester
, set_tags
);
72 AROS_ATOMIC_AND(gadget
->Flags
, ~GFLG_DISABLED
);
75 RefreshGList (gadget
, window
, requester
, 1);