grub2: bring back build of aros-side grub2 tools
[AROS.git] / rom / intuition / modifyprop.c
blobd0dd0139b9e0d8115546e1a5d18749bf148fef8b
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
4 $Id$
5 */
7 #include <proto/layers.h>
8 #include "intuition_intern.h"
10 /*****************************************************************************
12 NAME */
13 #include <intuition/intuition.h>
14 #include <proto/intuition.h>
16 AROS_LH8(void, ModifyProp,
18 /* SYNOPSIS */
19 AROS_LHA(struct Gadget *, gadget, A0),
20 AROS_LHA(struct Window *, window, A1),
21 AROS_LHA(struct Requester *, requester, A2),
22 AROS_LHA(ULONG , flags, D0),
23 AROS_LHA(ULONG , horizPot, D1),
24 AROS_LHA(ULONG , vertPot, D2),
25 AROS_LHA(ULONG , horizBody, D3),
26 AROS_LHA(ULONG , vertBody, D4),
28 /* LOCATION */
29 struct IntuitionBase *, IntuitionBase, 26, Intuition)
31 /* FUNCTION
32 Changes the values in the PropInfo-structure of a proportional
33 gadget and refreshes the display.
35 INPUTS
36 gadget - Must be a PROPGADGET
37 window - The window which contains the gadget
38 requester - If the gadget has GTYP_REQGADGET set, this must be
39 non-NULL.
40 flags - New flags
41 horizPot - New value for the HorizPot field of the PropInfo
42 vertPot - New value for the VertPot field of the PropInfo
43 horizBody - New value for the HorizBody field of the PropInfo
44 vertBody - New value for the VertBody field of the PropInfo
46 RESULT
47 None.
49 NOTES
50 This function causes all gadgets from this gadget to the end of
51 the gadget list to be refreshed. If you want a better behaviour,
52 use NewModifProp().
54 EXAMPLE
56 BUGS
58 SEE ALSO
59 NewModifyProp()
61 INTERNALS
63 *****************************************************************************/
65 AROS_LIBFUNC_INIT
67 struct PropInfo * pi;
69 if ((gadget->GadgetType & GTYP_GTYPEMASK) != GTYP_PROPGADGET
70 || !gadget->SpecialInfo || !window)
72 return;
75 EXTENDUWORD(horizPot);
76 EXTENDUWORD(vertPot);
77 EXTENDUWORD(horizBody);
78 EXTENDUWORD(vertBody);
79 EXTENDUWORD(flags);
81 pi = gadget->SpecialInfo;
83 /* We don't want the inputhandler to redraw the knob with values
84 * partially changed, so use some protection.
86 #ifdef USEGADGETLOCK
87 ObtainSemaphore(&GetPrivIBase(IntuitionBase)->InputHandlerLock);
88 #else
89 LOCKWINDOWLAYERS(window);
90 #endif
91 pi->Flags = flags;
92 pi->HorizPot = horizPot;
93 pi->VertPot = vertPot;
94 pi->HorizBody = horizBody;
95 pi->VertBody = vertBody;
97 RefreshGadgets (gadget, window, requester);
99 #ifdef USEGADGETLOCK
100 ReleaseSemaphore(&GetPrivIBase(IntuitionBase)->InputHandlerLock);
101 #else
102 UNLOCKWINDOWLAYERS(window);
103 #endif
105 AROS_LIBFUNC_EXIT
106 } /* ModifyProp */