New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / rom / intuition / modifyprop.c
blob3cd784fa71a9b79883f72c3ccbea5b3196484fc6
1 /*
2 Copyright © 1995-2003, 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 HISTORY
64 29-10-95 digulla automatically created from
65 intuition_lib.fd and clib/intuition_protos.h
67 *****************************************************************************/
69 AROS_LIBFUNC_INIT
70 AROS_LIBBASE_EXT_DECL(struct IntuitionBase *,IntuitionBase)
72 struct PropInfo * pi;
74 if ((gadget->GadgetType & GTYP_GTYPEMASK) != GTYP_PROPGADGET
75 || !gadget->SpecialInfo || !window)
77 return;
80 EXTENDUWORD(horizPot);
81 EXTENDUWORD(vertPot);
82 EXTENDUWORD(horizBody);
83 EXTENDUWORD(vertBody);
84 EXTENDUWORD(flags);
86 pi = gadget->SpecialInfo;
88 /* We don't want the inputhandler to redraw the knob with values
89 * partially changed, so use some protection.
91 #ifdef USEGADGETLOCK
92 ObtainSemaphore(&GetPrivIBase(IntuitionBase)->InputHandlerLock);
93 #else
94 LOCKWINDOWLAYERS(window);
95 #endif
96 pi->Flags = flags;
97 pi->HorizPot = horizPot;
98 pi->VertPot = vertPot;
99 pi->HorizBody = horizBody;
100 pi->VertBody = vertBody;
102 RefreshGadgets (gadget, window, requester);
104 #ifdef USEGADGETLOCK
105 ReleaseSemaphore(&GetPrivIBase(IntuitionBase)->InputHandlerLock);
106 #else
107 UNLOCKWINDOWLAYERS(window);
108 #endif
110 AROS_LIBFUNC_EXIT
111 } /* ModifyProp */