2 Copyright © 1995-2007, 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,
64 29-10-95 digulla automatically created from
65 intuition_lib.fd and clib/intuition_protos.h
67 *****************************************************************************/
73 if ((gadget
->GadgetType
& GTYP_GTYPEMASK
) != GTYP_PROPGADGET
74 || !gadget
->SpecialInfo
|| !window
)
79 EXTENDUWORD(horizPot
);
81 EXTENDUWORD(horizBody
);
82 EXTENDUWORD(vertBody
);
85 pi
= gadget
->SpecialInfo
;
87 /* We don't want the inputhandler to redraw the knob with values
88 * partially changed, so use some protection.
91 ObtainSemaphore(&GetPrivIBase(IntuitionBase
)->InputHandlerLock
);
93 LOCKWINDOWLAYERS(window
);
96 pi
->HorizPot
= horizPot
;
97 pi
->VertPot
= vertPot
;
98 pi
->HorizBody
= horizBody
;
99 pi
->VertBody
= vertBody
;
101 RefreshGadgets (gadget
, window
, requester
);
104 ReleaseSemaphore(&GetPrivIBase(IntuitionBase
)->InputHandlerLock
);
106 UNLOCKWINDOWLAYERS(window
);