New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / rom / intuition / releasegirport.c
blob0a64e5a2d23af9473836faa44051c865007b4fd2
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/graphics.h>
8 #include <proto/layers.h>
9 #include "intuition_intern.h"
11 /*****************************************************************************
13 NAME */
14 #include <graphics/rastport.h>
15 #include <proto/intuition.h>
17 AROS_LH1(void, ReleaseGIRPort,
19 /* SYNOPSIS */
20 AROS_LHA(struct RastPort *, rp, A0),
22 /* LOCATION */
23 struct IntuitionBase *, IntuitionBase, 94, Intuition)
25 /* FUNCTION
26 Release a RastPort previously obtained by ObtainGIRPort().
28 INPUTS
29 rp - The result of ObtainGIRPort()
31 RESULT
32 None.
34 NOTES
36 EXAMPLE
38 BUGS
40 SEE ALSO
42 INTERNALS
44 HISTORY
45 29-10-95 digulla automatically created from
46 intuition_lib.fd and clib/intuition_protos.h
48 *****************************************************************************/
50 AROS_LIBFUNC_INIT
51 AROS_LIBBASE_EXT_DECL(struct IntuitionBase *,IntuitionBase)
53 DEBUG_RELEASEGIRPORT(dprintf("ReleaseGIRPort: RPort 0x%lx\n", rp));
55 if (rp)
57 if (rp->Layer)
59 if ((--(GetPrivIBase(IntuitionBase)->BackupLayerContext.nestcount)) == 0)
61 InstallClipRegion(rp->Layer,GetPrivIBase(IntuitionBase)->BackupLayerContext.clipregion);
63 rp->Layer->Scroll_X = GetPrivIBase(IntuitionBase)->BackupLayerContext.scroll_x;
64 rp->Layer->Scroll_Y = GetPrivIBase(IntuitionBase)->BackupLayerContext.scroll_y;
67 /* bug("----------- RELEASE: %x\n",rp->Layer);*/
68 UnlockLayer(rp->Layer);
71 UNLOCKGADGET
73 FreeRastPort (rp);
76 AROS_LIBFUNC_EXIT
77 } /* ReleaseGIRPort */