2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 #include <proto/layers.h>
8 #include "intuition_intern.h"
10 /*****************************************************************************
13 #include <intuition/intuition.h>
14 #include <proto/intuition.h>
16 AROS_LH8(void, ModifyProp
,
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
),
29 struct IntuitionBase
*, IntuitionBase
, 26, Intuition
)
32 Changes the values in the PropInfo-structure of a proportional
33 gadget and refreshes the display.
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
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
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,
63 *****************************************************************************/
69 if ((gadget
->GadgetType
& GTYP_GTYPEMASK
) != GTYP_PROPGADGET
70 || !gadget
->SpecialInfo
|| !window
)
75 EXTENDUWORD(horizPot
);
77 EXTENDUWORD(horizBody
);
78 EXTENDUWORD(vertBody
);
81 pi
= gadget
->SpecialInfo
;
83 /* We don't want the inputhandler to redraw the knob with values
84 * partially changed, so use some protection.
87 ObtainSemaphore(&GetPrivIBase(IntuitionBase
)->InputHandlerLock
);
89 LOCKWINDOWLAYERS(window
);
92 pi
->HorizPot
= horizPot
;
93 pi
->VertPot
= vertPot
;
94 pi
->HorizBody
= horizBody
;
95 pi
->VertBody
= vertBody
;
97 RefreshGadgets (gadget
, window
, requester
);
100 ReleaseSemaphore(&GetPrivIBase(IntuitionBase
)->InputHandlerLock
);
102 UNLOCKWINDOWLAYERS(window
);