2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
8 #include <proto/intuition.h>
9 #include <proto/utility.h>
10 #include "gadtools_intern.h"
12 /*********************************************************************
15 #include <proto/gadtools.h>
16 #include <proto/intuition.h>
17 #include <intuition/intuition.h>
18 #include <utility/tagitem.h>
20 AROS_LH4(void, GT_SetGadgetAttrsA
,
23 AROS_LHA(struct Gadget
*, gad
, A0
),
24 AROS_LHA(struct Window
*, win
, A1
),
25 AROS_LHA(struct Requester
*, req
, A2
),
26 AROS_LHA(struct TagItem
*, tagList
, A3
),
29 struct Library
*, GadToolsBase
, 7, GadTools
)
32 Change the attribute of the given gadget according to the
33 attributes chosen in the tag list. If an attribute is not
34 provided in the tag list, its value remains unchanged.
37 gad - Gadget, for which the specified attributes should be set for.
38 May be be NULL. If so this functions does nothing.
39 win - Window, in which the gadget is.
40 req - Not used. Specify NULL for now.
41 tagList - List of attributes to set.
44 The gadget may be set to the specified attributes.
53 GT_GetGadgetAttrsA(), intuition.library/SetGadgetAttrsA()
59 ***************************************************************************/
63 if (!gad
) return; /* Since V39 gad pointer may be NULL */
65 if ((gad
->GadgetType
& GTYP_GTYPEMASK
) == GTYP_CUSTOMGADGET
)
69 SetGadgetAttrsA(gad
, win
, req
, tagList
);
73 SetAttrsA((Object
*)gad
, tagList
);
78 /* must be GENERIC_KIND gadget */
81 const struct TagItem
*tstate
= tagList
;
84 while((tag
= NextTagItem(&tstate
)))
91 gad
->Flags
|= GFLG_DISABLED
;
95 gad
->Flags
&= ~GFLG_DISABLED
;
103 if (redraw
&& (win
|| req
)) RefreshGList(gad
, win
, req
, 1);
109 } /* GT_SetGadgetAttrsA */