2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
6 Miscellaneous requester functions.
9 #include <proto/graphics.h>
10 #include <proto/layers.h>
11 #include <proto/exec.h>
12 #include <proto/intuition.h>
13 #include <proto/cybergraphics.h>
14 #include <exec/types.h>
15 #include <intuition/intuition.h>
16 #include <intuition/gadgetclass.h>
17 #include <intuition/imageclass.h>
18 #include <graphics/rpattr.h>
19 #include "intuition_intern.h"
20 #include "requesters.h"
22 #define DEBUG_REQUESTER(x) ;
24 /* free the array of gadgetlabels made in BuildEasyRequestArgs() */
25 void intrequest_freelabels(STRPTR
*gadgetlabels
, struct IntuitionBase
*IntuitionBase
)
29 FreeVec(gadgetlabels
[0]);
30 FreeVec(gadgetlabels
);
35 /* free the gadgets made in BuildEasyRequestArgs() */
36 void intrequest_freegadgets(struct Gadget
*gadgets
, struct IntuitionBase
*IntuitionBase
)
38 struct Image
*frame
= gadgets
->GadgetRender
;
42 struct Gadget
* nextgadget
= 0;
44 GetAttr(GA_Next
, (Object
*)gadgets
, (IPTR
*)&nextgadget
);
45 DisposeObject(gadgets
);
53 /*****************************************************************************/
56 /* render a standard requester */
57 void render_requester(struct Requester
*requester
, struct IntuitionBase
*IntuitionBase
)
59 struct RastPort
*rp
= requester
->ReqLayer
->rp
;
61 if ((requester
->Flags
& NOREQBACKFILL
) == 0)
62 SetRast(rp
, requester
->BackFill
);
64 if (requester
->ImageBMap
&& requester
->Flags
& PREDRAWN
)
65 BltBitMapRastPort(requester
->ImageBMap
, 0, 0,
66 rp
, 0, 0, requester
->Width
, requester
->Height
, 0xc0);
68 if (requester
->ReqImage
&& requester
->Flags
& USEREQIMAGE
)
69 DrawImage(rp
, requester
->ReqImage
, 0, 0);
71 if (requester
->ReqBorder
)
72 DrawBorder(rp
, requester
->ReqBorder
, 0, 0);
74 if (requester
->ReqGadget
)
75 RefreshGList(requester
->ReqGadget
, requester
->RWindow
, requester
, -1);
77 if (requester
->ReqText
)
78 PrintIText(rp
, requester
->ReqText
, 0, 0);